summaryrefslogtreecommitdiffstats
path: root/drivers/video/fbdev/savage/savagefb_driver.c
diff options
context:
space:
mode:
authorJulia Lawall <Julia.Lawall@lip6.fr>2016-09-11 17:17:20 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-09-27 11:16:35 +0300
commitca9384c5911199257cbdf48f1bc3e3986de611a2 (patch)
treebe526bb6c590a0b30425a71367d1a447ba40ad35 /drivers/video/fbdev/savage/savagefb_driver.c
parent1d2ffbd3e06d852362dbaa3457e0796cb32ee8ff (diff)
downloadblackbird-obmc-linux-ca9384c5911199257cbdf48f1bc3e3986de611a2.tar.gz
blackbird-obmc-linux-ca9384c5911199257cbdf48f1bc3e3986de611a2.zip
video: fbdev: constify fb_fix_screeninfo and fb_var_screeninfo structures
These structures are only used to copy into other structures, so declare them as const. The semantic patch that makes this change in the fb_fix_screeninfo case is as follows (http://coccinelle.lip6.fr/). The fb_var_screeninfo case is analogous. // <smpl> @r disable optional_qualifier@ identifier i; position p; @@ static struct fb_fix_screeninfo i@p = { ... }; @ok@ identifier r.i; expression e; position p; @@ e = i@p @bad@ position p != {r.p,ok.p}; identifier r.i; struct fb_fix_screeninfo e; @@ e@i@p @depends on !bad disable optional_qualifier@ identifier r.i; @@ static +const struct fb_fix_screeninfo i = { ... }; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/fbdev/savage/savagefb_driver.c')
-rw-r--r--drivers/video/fbdev/savage/savagefb_driver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/savage/savagefb_driver.c b/drivers/video/fbdev/savage/savagefb_driver.c
index 6c77ab09b0b2..c30a91c1137c 100644
--- a/drivers/video/fbdev/savage/savagefb_driver.c
+++ b/drivers/video/fbdev/savage/savagefb_driver.c
@@ -1660,7 +1660,7 @@ static struct fb_ops savagefb_ops = {
/* --------------------------------------------------------------------- */
-static struct fb_var_screeninfo savagefb_var800x600x8 = {
+static const struct fb_var_screeninfo savagefb_var800x600x8 = {
.accel_flags = FB_ACCELF_TEXT,
.xres = 800,
.yres = 600,
OpenPOWER on IntegriCloud