video: fbdev: make fb_videomode const

Make these const as they are only passed to a const argument of the
function fb_find_mode.

Done using Coccinelle.

@match disable optional_qualifier@
identifier s;
@@
static struct fb_videomode s = {...};

@ref@
position p;
identifier match.s;
@@
s@p

@good1@
identifier match.s;
expression list[5] es;
position ref.p;
@@
fb_find_mode(es,&s@p,...)

@bad depends on !good1@
position ref.p;
identifier match.s;
@@
s@p

@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct fb_videomode s;

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Russell King <linux@armlinux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

authored by

Bhumika Goyal and committed by
Bartlomiej Zolnierkiewicz
58ec01ce 52a962ee

+6 -6
+1 -1
drivers/video/fbdev/aty/aty128fb.c
··· 116 116 117 117 /* default modedb mode */ 118 118 /* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */ 119 - static struct fb_videomode defaultmode = { 119 + static const struct fb_videomode defaultmode = { 120 120 .refresh = 60, 121 121 .xres = 640, 122 122 .yres = 480,
+1 -1
drivers/video/fbdev/aty/atyfb_base.c
··· 274 274 0, FB_VMODE_NONINTERLACED 275 275 }; 276 276 277 - static struct fb_videomode defmode = { 277 + static const struct fb_videomode defmode = { 278 278 /* 640x480 @ 60 Hz, 31.5 kHz hsync */ 279 279 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 280 280 0, FB_VMODE_NONINTERLACED
+1 -1
drivers/video/fbdev/cyber2000fb.c
··· 1336 1336 * These parameters give 1337 1337 * 640x480, hsync 31.5kHz, vsync 60Hz 1338 1338 */ 1339 - static struct fb_videomode cyber2000fb_default_mode = { 1339 + static const struct fb_videomode cyber2000fb_default_mode = { 1340 1340 .refresh = 60, 1341 1341 .xres = 640, 1342 1342 .yres = 480,
+1 -1
drivers/video/fbdev/matrox/matroxfb_base.c
··· 1573 1573 NULL}}; 1574 1574 1575 1575 #ifndef MODULE 1576 - static struct fb_videomode defaultmode = { 1576 + static const struct fb_videomode defaultmode = { 1577 1577 /* 640x480 @ 60Hz, 31.5 kHz */ 1578 1578 NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2, 1579 1579 0, FB_VMODE_NONINTERLACED
+1 -1
drivers/video/fbdev/sm501fb.c
··· 46 46 static char *fb_mode = "640x480-16@60"; 47 47 static unsigned long default_bpp = 16; 48 48 49 - static struct fb_videomode sm501_default_mode = { 49 + static const struct fb_videomode sm501_default_mode = { 50 50 .refresh = 60, 51 51 .xres = 640, 52 52 .yres = 480,
+1 -1
drivers/video/fbdev/vermilion/vermilion.c
··· 55 55 static struct fb_ops vmlfb_ops; 56 56 static struct vml_sys *subsys = NULL; 57 57 static char *vml_default_mode = "1024x768@60"; 58 - static struct fb_videomode defaultmode = { 58 + static const struct fb_videomode defaultmode = { 59 59 NULL, 60, 1024, 768, 12896, 144, 24, 29, 3, 136, 6, 60 60 0, FB_VMODE_NONINTERLACED 61 61 };