video: fbdev: make fb_videomode const
authorBhumika Goyal <bhumirks@gmail.com>
Mon, 4 Sep 2017 14:00:49 +0000 (16:00 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 4 Sep 2017 14:00:49 +0000 (16:00 +0200)
commit58ec01cebafd4b9fc039c12c744013e9c71ec802
treecc2f44ee06e4a55008076fb2b2c0c04cc67f9a92
parent52a962ee1ca4dca721d44fe59aca1faea9f418cf
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>
drivers/video/fbdev/aty/aty128fb.c
drivers/video/fbdev/aty/atyfb_base.c
drivers/video/fbdev/cyber2000fb.c
drivers/video/fbdev/matrox/matroxfb_base.c
drivers/video/fbdev/sm501fb.c
drivers/video/fbdev/vermilion/vermilion.c