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

Commit 58ec01ce authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Bartlomiej Zolnierkiewicz
Browse files

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: default avatarBhumika 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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 52a962ee
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -116,7 +116,7 @@ static const struct fb_var_screeninfo default_var = {

/* default modedb mode */
/* 640x480, 60 Hz, Non-Interlaced (25.172 MHz dotclock) */
static struct fb_videomode defaultmode = {
static const struct fb_videomode defaultmode = {
	.refresh =	60,
	.xres =		640,
	.yres =		480,
+1 −1
Original line number Diff line number Diff line
@@ -274,7 +274,7 @@ static struct fb_var_screeninfo default_var = {
	0, FB_VMODE_NONINTERLACED
};

static struct fb_videomode defmode = {
static const struct fb_videomode defmode = {
	/* 640x480 @ 60 Hz, 31.5 kHz hsync */
	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
	0, FB_VMODE_NONINTERLACED
+1 −1
Original line number Diff line number Diff line
@@ -1336,7 +1336,7 @@ static void cyber2000fb_i2c_unregister(struct cfb_info *cfb)
 * These parameters give
 * 640x480, hsync 31.5kHz, vsync 60Hz
 */
static struct fb_videomode cyber2000fb_default_mode = {
static const struct fb_videomode cyber2000fb_default_mode = {
	.refresh	= 60,
	.xres		= 640,
	.yres		= 480,
+1 −1
Original line number Diff line number Diff line
@@ -1573,7 +1573,7 @@ static struct board {
		NULL}};

#ifndef MODULE
static struct fb_videomode defaultmode = {
static const struct fb_videomode defaultmode = {
	/* 640x480 @ 60Hz, 31.5 kHz */
	NULL, 60, 640, 480, 39721, 40, 24, 32, 11, 96, 2,
	0, FB_VMODE_NONINTERLACED
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
static char *fb_mode = "640x480-16@60";
static unsigned long default_bpp = 16;

static struct fb_videomode sm501_default_mode = {
static const struct fb_videomode sm501_default_mode = {
	.refresh	= 60,
	.xres		= 640,
	.yres		= 480,
Loading