Commit a180d023 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Miguel Ojeda

auxdisplay: ht16k33: Make ht16k33_fb_fix and ht16k33_fb_var constant

The static structures ht16k33_fb_fix and ht16k33_fb_var, of types
fb_fix_screeninfo and fb_var_screeninfo respectively, are not used
except to be copied into other variables. Hence make both of them
constant to prevent unintended modification.
Issue found with
Coccinelle.
Acked-by: default avatarRobin van der Gracht <robin@protonic.nl>
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarMiguel Ojeda <miguel.ojeda.sandonis@gmail.com>
parent d1abaeb3
...@@ -74,7 +74,7 @@ struct ht16k33_priv { ...@@ -74,7 +74,7 @@ struct ht16k33_priv {
struct ht16k33_fbdev fbdev; struct ht16k33_fbdev fbdev;
}; };
static struct fb_fix_screeninfo ht16k33_fb_fix = { static const struct fb_fix_screeninfo ht16k33_fb_fix = {
.id = DRIVER_NAME, .id = DRIVER_NAME,
.type = FB_TYPE_PACKED_PIXELS, .type = FB_TYPE_PACKED_PIXELS,
.visual = FB_VISUAL_MONO10, .visual = FB_VISUAL_MONO10,
...@@ -85,7 +85,7 @@ static struct fb_fix_screeninfo ht16k33_fb_fix = { ...@@ -85,7 +85,7 @@ static struct fb_fix_screeninfo ht16k33_fb_fix = {
.accel = FB_ACCEL_NONE, .accel = FB_ACCEL_NONE,
}; };
static struct fb_var_screeninfo ht16k33_fb_var = { static const struct fb_var_screeninfo ht16k33_fb_var = {
.xres = HT16K33_MATRIX_LED_MAX_ROWS, .xres = HT16K33_MATRIX_LED_MAX_ROWS,
.yres = HT16K33_MATRIX_LED_MAX_COLS, .yres = HT16K33_MATRIX_LED_MAX_COLS,
.xres_virtual = HT16K33_MATRIX_LED_MAX_ROWS, .xres_virtual = HT16K33_MATRIX_LED_MAX_ROWS,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment