Commit 3a493879 authored by Thierry Reding's avatar Thierry Reding Committed by Dave Airlie

drm: Constify struct drm_fb_helper_funcs

There's no need for this to be modifiable. Make it const so that it can
be put into the .rodata section.
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Acked-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 50c3dc97
...@@ -131,7 +131,7 @@ static int armada_fb_probe(struct drm_fb_helper *fbh, ...@@ -131,7 +131,7 @@ static int armada_fb_probe(struct drm_fb_helper *fbh,
return ret; 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_set = armada_drm_crtc_gamma_set,
.gamma_get = armada_drm_crtc_gamma_get, .gamma_get = armada_drm_crtc_gamma_get,
.fb_probe = armada_fb_probe, .fb_probe = armada_fb_probe,
......
...@@ -287,7 +287,7 @@ static void ast_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, ...@@ -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; *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_set = ast_fb_gamma_set,
.gamma_get = ast_fb_gamma_get, .gamma_get = ast_fb_gamma_get,
.fb_probe = astfb_create, .fb_probe = astfb_create,
......
...@@ -179,7 +179,7 @@ void bochs_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green, ...@@ -179,7 +179,7 @@ void bochs_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
*blue = regno; *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_set = bochs_fb_gamma_set,
.gamma_get = bochs_fb_gamma_get, .gamma_get = bochs_fb_gamma_get,
.fb_probe = bochsfb_create, .fb_probe = bochsfb_create,
......
...@@ -288,7 +288,7 @@ static int cirrus_fbdev_destroy(struct drm_device *dev, ...@@ -288,7 +288,7 @@ static int cirrus_fbdev_destroy(struct drm_device *dev,
return 0; 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_set = cirrus_crtc_fb_gamma_set,
.gamma_get = cirrus_crtc_fb_gamma_get, .gamma_get = cirrus_crtc_fb_gamma_get,
.fb_probe = cirrusfb_create, .fb_probe = cirrusfb_create,
......
...@@ -327,7 +327,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper, ...@@ -327,7 +327,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper,
return ret; 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, .fb_probe = drm_fbdev_cma_create,
}; };
......
...@@ -225,7 +225,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper, ...@@ -225,7 +225,7 @@ static int exynos_drm_fbdev_create(struct drm_fb_helper *helper,
return ret; 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, .fb_probe = exynos_drm_fbdev_create,
}; };
......
...@@ -561,7 +561,7 @@ static int psbfb_probe(struct drm_fb_helper *helper, ...@@ -561,7 +561,7 @@ static int psbfb_probe(struct drm_fb_helper *helper,
return psbfb_create(psb_fbdev, sizes); 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_set = psbfb_gamma_set,
.gamma_get = psbfb_gamma_get, .gamma_get = psbfb_gamma_get,
.fb_probe = psbfb_probe, .fb_probe = psbfb_probe,
......
...@@ -452,7 +452,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper, ...@@ -452,7 +452,7 @@ static bool intel_fb_initial_config(struct drm_fb_helper *fb_helper,
return true; 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, .initial_config = intel_fb_initial_config,
.gamma_set = intel_crtc_fb_gamma_set, .gamma_set = intel_crtc_fb_gamma_set,
.gamma_get = intel_crtc_fb_gamma_get, .gamma_get = intel_crtc_fb_gamma_get,
......
...@@ -272,7 +272,7 @@ static int mga_fbdev_destroy(struct drm_device *dev, ...@@ -272,7 +272,7 @@ static int mga_fbdev_destroy(struct drm_device *dev,
return 0; 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_set = mga_crtc_fb_gamma_set,
.gamma_get = mga_crtc_fb_gamma_get, .gamma_get = mga_crtc_fb_gamma_get,
.fb_probe = mgag200fb_create, .fb_probe = mgag200fb_create,
......
...@@ -177,7 +177,7 @@ static void msm_crtc_fb_gamma_get(struct drm_crtc *crtc, ...@@ -177,7 +177,7 @@ static void msm_crtc_fb_gamma_get(struct drm_crtc *crtc,
DBG("fbdev: get gamma"); 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_set = msm_crtc_fb_gamma_set,
.gamma_get = msm_crtc_fb_gamma_get, .gamma_get = msm_crtc_fb_gamma_get,
.fb_probe = msm_fbdev_create, .fb_probe = msm_fbdev_create,
......
...@@ -438,7 +438,7 @@ void nouveau_fbcon_gpu_lockup(struct fb_info *info) ...@@ -438,7 +438,7 @@ void nouveau_fbcon_gpu_lockup(struct fb_info *info)
info->flags |= FBINFO_HWACCEL_DISABLED; 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_set = nouveau_fbcon_gamma_set,
.gamma_get = nouveau_fbcon_gamma_get, .gamma_get = nouveau_fbcon_gamma_get,
.fb_probe = nouveau_fbcon_create, .fb_probe = nouveau_fbcon_create,
......
...@@ -281,7 +281,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper, ...@@ -281,7 +281,7 @@ static int omap_fbdev_create(struct drm_fb_helper *helper,
return ret; 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, .fb_probe = omap_fbdev_create,
}; };
......
...@@ -660,7 +660,7 @@ static int qxl_fbdev_destroy(struct drm_device *dev, struct qxl_fbdev *qfbdev) ...@@ -660,7 +660,7 @@ static int qxl_fbdev_destroy(struct drm_device *dev, struct qxl_fbdev *qfbdev)
return 0; 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, .fb_probe = qxl_fb_find_or_create_single,
}; };
......
...@@ -331,7 +331,7 @@ static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfb ...@@ -331,7 +331,7 @@ static int radeon_fbdev_destroy(struct drm_device *dev, struct radeon_fbdev *rfb
return 0; 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_set = radeon_crtc_fb_gamma_set,
.gamma_get = radeon_crtc_fb_gamma_get, .gamma_get = radeon_crtc_fb_gamma_get,
.fb_probe = radeonfb_create, .fb_probe = radeonfb_create,
......
...@@ -267,7 +267,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper, ...@@ -267,7 +267,7 @@ static int tegra_fbdev_probe(struct drm_fb_helper *helper,
return err; 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, .fb_probe = tegra_fbdev_probe,
}; };
......
...@@ -550,7 +550,7 @@ static int udlfb_create(struct drm_fb_helper *helper, ...@@ -550,7 +550,7 @@ static int udlfb_create(struct drm_fb_helper *helper,
return ret; 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, .fb_probe = udlfb_create,
}; };
......
...@@ -87,7 +87,7 @@ struct drm_fb_helper { ...@@ -87,7 +87,7 @@ struct drm_fb_helper {
struct drm_fb_helper_crtc *crtc_info; struct drm_fb_helper_crtc *crtc_info;
int connector_count; int connector_count;
struct drm_fb_helper_connector **connector_info; struct drm_fb_helper_connector **connector_info;
struct drm_fb_helper_funcs *funcs; const struct drm_fb_helper_funcs *funcs;
struct fb_info *fbdev; struct fb_info *fbdev;
u32 pseudo_palette[17]; u32 pseudo_palette[17];
struct list_head kernel_fb_list; struct list_head kernel_fb_list;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment