summaryrefslogtreecommitdiff
path: root/drivers/video/fbdev/aty
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-09-04 16:00:49 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2017-09-04 16:00:49 +0200
commit58ec01cebafd4b9fc039c12c744013e9c71ec802 (patch)
treecc2f44ee06e4a55008076fb2b2c0c04cc67f9a92 /drivers/video/fbdev/aty
parent52a962ee1ca4dca721d44fe59aca1faea9f418cf (diff)
downloadlinux-58ec01cebafd4b9fc039c12c744013e9c71ec802.tar.gz
linux-58ec01cebafd4b9fc039c12c744013e9c71ec802.tar.xz
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>
Diffstat (limited to 'drivers/video/fbdev/aty')
-rw-r--r--drivers/video/fbdev/aty/aty128fb.c2
-rw-r--r--drivers/video/fbdev/aty/atyfb_base.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c
index ba64e26e38d3..db18474607c9 100644
--- a/drivers/video/fbdev/aty/aty128fb.c
+++ b/drivers/video/fbdev/aty/aty128fb.c
@@ -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,
diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c
index 1681d2db1d3e..f49efb2fb75f 100644
--- a/drivers/video/fbdev/aty/atyfb_base.c
+++ b/drivers/video/fbdev/aty/atyfb_base.c
@@ -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