Skip to content

Commit

Permalink
udlfb: Make dlfb_ops constant
Browse files Browse the repository at this point in the history
Static structure dlfb_ops, of type fb_ops, is not used except to be
copied into another variable. Hence make dlfb_ops constant to protect it
from unintended modification.
Issue found with Coccinelle.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Cc: Bernie Thompson <bernie@plugable.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190819075236.1051-1-nishkadg.linux@gmail.com
  • Loading branch information
Nishka Dasgupta authored and Bartlomiej Zolnierkiewicz committed Aug 19, 2019
1 parent 06b1f4b commit df5eff6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/video/fbdev/udlfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ static int dlfb_ops_blank(int blank_mode, struct fb_info *info)
return 0;
}

static struct fb_ops dlfb_ops = {
static const struct fb_ops dlfb_ops = {
.owner = THIS_MODULE,
.fb_read = fb_sys_read,
.fb_write = dlfb_ops_write,
Expand Down

0 comments on commit df5eff6

Please sign in to comment.