Skip to content

Commit b8beae9

Browse files
krzklag-linaro
authored andcommitted
HID: picoLCD: Constify lcd_ops
'struct lcd_ops' is not modified by core backlight code, so it can be made const for increased code safety. Signed-off-by: Krzysztof Kozlowski <[email protected]> Reviewed-by: Bruno Prémont <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent ee7b1e8 commit b8beae9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-picolcd_lcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb)
4646
return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev));
4747
}
4848

49-
static struct lcd_ops picolcd_lcdops = {
49+
static const struct lcd_ops picolcd_lcdops = {
5050
.get_contrast = picolcd_get_contrast,
5151
.set_contrast = picolcd_set_contrast,
5252
.check_fb = picolcd_check_lcd_fb,

0 commit comments

Comments
 (0)