Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -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,
+1 −1
Original line number Diff line number Diff line
@@ -327,7 +327,7 @@ static int drm_fbdev_cma_create(struct drm_fb_helper *helper,
	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,
};

Loading