Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <krzk@kernel.org>
Reviewed-by: Bruno Prémont <bonbons@linux-vserver.org>
Link: https://lore.kernel.org/r/20240424-video-backlight-lcd-ops-v2-15-1aaa82b07bc6@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>

authored by

Krzysztof Kozlowski and committed by
Lee Jones
b8beae94 ee7b1e84

+1 -1
+1 -1
drivers/hid/hid-picolcd_lcd.c
··· 46 46 return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev)); 47 47 } 48 48 49 - static struct lcd_ops picolcd_lcdops = { 49 + static const struct lcd_ops picolcd_lcdops = { 50 50 .get_contrast = picolcd_get_contrast, 51 51 .set_contrast = picolcd_set_contrast, 52 52 .check_fb = picolcd_check_lcd_fb,