projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ee7b1e8
)
HID: picoLCD: Constify lcd_ops
author
Krzysztof Kozlowski
<krzk@kernel.org>
Wed, 24 Apr 2024 06:33:41 +0000
(08:33 +0200)
committer
Lee Jones
<lee@kernel.org>
Fri, 3 May 2024 09:45:34 +0000
(10:45 +0100)
'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>
drivers/hid/hid-picolcd_lcd.c
patch
|
blob
|
history
diff --git
a/drivers/hid/hid-picolcd_lcd.c
b/drivers/hid/hid-picolcd_lcd.c
index 0c4b76de8ae53566460b661c873642c7f0ae97c4..061a33ba7b1db9bb7923518a1daabe9f74b37a04 100644
(file)
--- a/
drivers/hid/hid-picolcd_lcd.c
+++ b/
drivers/hid/hid-picolcd_lcd.c
@@
-46,7
+46,7
@@
static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb)
return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev));
}
-static struct lcd_ops picolcd_lcdops = {
+static
const
struct lcd_ops picolcd_lcdops = {
.get_contrast = picolcd_get_contrast,
.set_contrast = picolcd_set_contrast,
.check_fb = picolcd_check_lcd_fb,