From 58ec01cebafd4b9fc039c12c744013e9c71ec802 Mon Sep 17 00:00:00 2001 From: Bhumika Goyal Date: Mon, 4 Sep 2017 16:00:49 +0200 Subject: 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 Cc: Julia Lawall Cc: Paul Mackerras Cc: Russell King Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/video/fbdev/vermilion/vermilion.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/video/fbdev/vermilion/vermilion.c') diff --git a/drivers/video/fbdev/vermilion/vermilion.c b/drivers/video/fbdev/vermilion/vermilion.c index 3fde4939dda3..6f8d444eb0e3 100644 --- a/drivers/video/fbdev/vermilion/vermilion.c +++ b/drivers/video/fbdev/vermilion/vermilion.c @@ -55,7 +55,7 @@ static struct list_head global_has_mode; static struct fb_ops vmlfb_ops; static struct vml_sys *subsys = NULL; static char *vml_default_mode = "1024x768@60"; -static struct fb_videomode defaultmode = { +static const struct fb_videomode defaultmode = { NULL, 60, 1024, 768, 12896, 144, 24, 29, 3, 136, 6, 0, FB_VMODE_NONINTERLACED }; -- cgit v1.2.3