drm: Constify struct drm_fb_helper_funcs
authorThierry Reding <treding@nvidia.com>
Fri, 27 Jun 2014 15:19:23 +0000 (17:19 +0200)
committerDave Airlie <airlied@redhat.com>
Tue, 8 Jul 2014 01:31:15 +0000 (11:31 +1000)
There's no need for this to be modifiable. Make it const so that it can
be put into the .rodata section.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
17 files changed:
drivers/gpu/drm/armada/armada_fbdev.c
drivers/gpu/drm/ast/ast_fb.c
drivers/gpu/drm/bochs/bochs_fbdev.c
drivers/gpu/drm/cirrus/cirrus_fbdev.c
drivers/gpu/drm/drm_fb_cma_helper.c
drivers/gpu/drm/exynos/exynos_drm_fbdev.c
drivers/gpu/drm/gma500/framebuffer.c
drivers/gpu/drm/i915/intel_fbdev.c
drivers/gpu/drm/mgag200/mgag200_fb.c
drivers/gpu/drm/msm/msm_fbdev.c
drivers/gpu/drm/nouveau/nouveau_fbcon.c
drivers/gpu/drm/omapdrm/omap_fbdev.c
drivers/gpu/drm/qxl/qxl_fb.c
drivers/gpu/drm/radeon/radeon_fb.c
drivers/gpu/drm/tegra/fb.c
drivers/gpu/drm/udl/udl_fb.c
include/drm/drm_fb_helper.h

index fd166f532ab94f30f2bc3b0d9eff226ea9a07fd7..a7c947cd93868f6b772dddb356123c826aff39f4 100644 (file)
@@ -131,7 +131,7 @@ static int armada_fb_probe(struct drm_fb_helper *fbh,
        return ret;
 }
 
-static struct drm_fb_helper_funcs armada_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs armada_fb_helper_funcs = {
        .gamma_set      = armada_drm_crtc_gamma_set,
        .gamma_get      = armada_drm_crtc_gamma_get,
        .fb_probe       = armada_fb_probe,
index a28640f47c2749e5848d129af85673fd8ccbc973..2113894e4ff82ce40ff7a40855c937e8d5ec0f02 100644 (file)
@@ -287,7 +287,7 @@ static void ast_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
        *blue = ast_crtc->lut_b[regno] << 8;
 }
 
-static struct drm_fb_helper_funcs ast_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs ast_fb_helper_funcs = {
        .gamma_set = ast_fb_gamma_set,
        .gamma_get = ast_fb_gamma_get,
        .fb_probe = astfb_create,
index 561b84474122a05e112ffafde7341e8a85f284ad..17e5c17f27305ebf3431252212028b8e7121b8b6 100644 (file)
@@ -179,7 +179,7 @@ void bochs_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
        *blue  = regno;
 }
 
-static struct drm_fb_helper_funcs bochs_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs bochs_fb_helper_funcs = {
        .gamma_set = bochs_fb_gamma_set,
        .gamma_get = bochs_fb_gamma_get,
        .fb_probe = bochsfb_create,
index 32bbba0a787bc9e85d68556756c62771b06c5adb..2bd0291168e42cd4414670e182089757a86a08bc 100644 (file)
@@ -288,7 +288,7 @@ static int cirrus_fbdev_destroy(struct drm_device *dev,
        return 0;
 }
 
-static struct drm_fb_helper_funcs cirrus_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs cirrus_fb_helper_funcs = {
        .gamma_set = cirrus_crtc_fb_gamma_set,
        .gamma_get = cirrus_crtc_fb_gamma_get,
        .fb_probe = cirrusfb_create,
index f27c883be391f51dfe0ef41e9cada8ed76ee67dc..cb01e16063841c14cd6f7f309a3579304d93822a 100644 (file)
@@ -327,7 +327,7 @@ err_drm_gem_cma_free_object:
        return ret;
 }
 
-static struct drm_fb_helper_funcs drm_fb_cma_helper_funcs = {
+static const struct drm_fb_helper_funcs drm_fb_cma_helper_funcs = {
        .fb_probe = drm_fbdev_cma_create,
 };
 
index d771b467cf0c03c70446f58bc68d3029dd5f6305..fc25fe75aa775852a2642e5a7ae450c02b7dbf55 100644 (file)
@@ -225,7 +225,7 @@ out:
        return ret;
 }
 
-static struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs exynos_drm_fb_helper_funcs = {
        .fb_probe =     exynos_drm_fbdev_create,
 };
 
index e7fcc148f333ed56de86a92b14bcc0297fd798ff..76e4d777d01d6cc3daf40dcd66a4b15ad07d10b2 100644 (file)
@@ -561,7 +561,7 @@ static int psbfb_probe(struct drm_fb_helper *helper,
        return psbfb_create(psb_fbdev, sizes);
 }
 
-static struct drm_fb_helper_funcs psb_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs psb_fb_helper_funcs = {
        .gamma_set = psbfb_gamma_set,
        .gamma_get = psbfb_gamma_get,
        .fb_probe = psbfb_probe,
index 088fe9378a4cbec751cd927142b48827a0b23226..c942d13cd5cb9ac966e8baf8130d65269136b3b4 100644 (file)
@@ -452,7 +452,7 @@ out:
        return true;
 }
 
-static struct drm_fb_helper_funcs intel_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs intel_fb_helper_funcs = {
        .initial_config = intel_fb_initial_config,
        .gamma_set = intel_crtc_fb_gamma_set,
        .gamma_get = intel_crtc_fb_gamma_get,
index 13b7dd83faa9ca7e6e05157d002be0199f3bd667..a4319aba91802ee9b9d79f9a1e063f0221e206aa 100644 (file)
@@ -272,7 +272,7 @@ static int mga_fbdev_destroy(struct drm_device *dev,
        return 0;
 }
 
-static struct drm_fb_helper_funcs mga_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs mga_fb_helper_funcs = {
        .gamma_set = mga_crtc_fb_gamma_set,
        .gamma_get = mga_crtc_fb_gamma_get,
        .fb_probe = mgag200fb_create,
index 5107fc4826bcec163100fc6152d9646df0959ca2..7e706c4cf033f3d770e0aa7b6c030ad7460f29a2 100644 (file)
@@ -177,7 +177,7 @@ static void msm_crtc_fb_gamma_get(struct drm_crtc *crtc,
        DBG("fbdev: get gamma");
 }
 
-static struct drm_fb_helper_funcs msm_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs msm_fb_helper_funcs = {
        .gamma_set = msm_crtc_fb_gamma_set,
        .gamma_get = msm_crtc_fb_gamma_get,
        .fb_probe = msm_fbdev_create,
index 64a42cfd371735fe6958147d9f07f6e235a5e417..8e9c07b7fc89493de1d67ce3347f3cc65bbb6255 100644 (file)
@@ -438,7 +438,7 @@ void nouveau_fbcon_gpu_lockup(struct fb_info *info)
        info->flags |= FBINFO_HWACCEL_DISABLED;
 }
 
-static struct drm_fb_helper_funcs nouveau_fbcon_helper_funcs = {
+static const struct drm_fb_helper_funcs nouveau_fbcon_helper_funcs = {
        .gamma_set = nouveau_fbcon_gamma_set,
        .gamma_get = nouveau_fbcon_gamma_get,
        .fb_probe = nouveau_fbcon_create,
index 1388ca7f87e84fefa07256cde5ebc07076e5087a..4cb12083eb128e1863acc4ac370c77aed321a01f 100644 (file)
@@ -281,7 +281,7 @@ fail:
        return ret;
 }
 
-static struct drm_fb_helper_funcs omap_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs omap_fb_helper_funcs = {
        .fb_probe = omap_fbdev_create,
 };
 
index f437b30ce6896736da893c2a8651ca23e0a1ed55..cf89614c72be4f667e2b442cb64d1b444ceb45c8 100644 (file)
@@ -660,7 +660,7 @@ static int qxl_fbdev_destroy(struct drm_device *dev, struct qxl_fbdev *qfbdev)
        return 0;
 }
 
-static struct drm_fb_helper_funcs qxl_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs qxl_fb_helper_funcs = {
        .fb_probe = qxl_fb_find_or_create_single,
 };
 
index 665ced3b7313b94a9c42e3f7cf8c0922ed7b1031..ad97afdbc4c7d2eed18112f75a34f4ead48561c0 100644 (file)
@@ -331,7 +331,7 @@ static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfb
        return 0;
 }
 
-static struct drm_fb_helper_funcs radeon_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs radeon_fb_helper_funcs = {
        .gamma_set = radeon_crtc_fb_gamma_set,
        .gamma_get = radeon_crtc_fb_gamma_get,
        .fb_probe = radeonfb_create,
index 9798a708032219adde9cfd6f75c75d937c704769..f7cf47bf0afb3edda72737e1d54e2216b916f24c 100644 (file)
@@ -267,7 +267,7 @@ release:
        return err;
 }
 
-static struct drm_fb_helper_funcs tegra_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs tegra_fb_helper_funcs = {
        .fb_probe = tegra_fbdev_probe,
 };
 
index 377176372da893e79b7c108b15cb73f18d8adb9a..0647c8cc368b283dc52364c3aa8ef9c422e1d3ba 100644 (file)
@@ -550,7 +550,7 @@ out:
        return ret;
 }
 
-static struct drm_fb_helper_funcs udl_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs udl_fb_helper_funcs = {
        .fb_probe = udlfb_create,
 };
 
index 7997246d4039fdfc9cf0dd183484187f04624c15..a47df7ca38e8a9d1aa82bbcbb5272391cefe43f9 100644 (file)
@@ -87,7 +87,7 @@ struct drm_fb_helper {
        struct drm_fb_helper_crtc *crtc_info;
        int connector_count;
        struct drm_fb_helper_connector **connector_info;
-       struct drm_fb_helper_funcs *funcs;
+       const struct drm_fb_helper_funcs *funcs;
        struct fb_info *fbdev;
        u32 pseudo_palette[17];
        struct list_head kernel_fb_list;