diff options
| author | Krzysztof Kozlowski <krzk@kernel.org> | 2024-04-24 08:33:27 +0200 |
|---|---|---|
| committer | Lee Jones <lee@kernel.org> | 2024-05-03 10:44:42 +0100 |
| commit | a2e25c8165f93ca8a2d54bf230e1bb7e0319b46c (patch) | |
| tree | d2bfbce00b3d4c3ec29fa07f7749ee70f677a148 /drivers/video | |
| parent | 4cece764965020c22cff7665b18a012006359095 (diff) | |
backlight: lcd: Constify lcd_ops
'struct lcd_ops' passed in lcd_device_register() is not modified by core
backlight code, so it can be made const for code safety. This allows
drivers to also define the structure as const.
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240424-video-backlight-lcd-ops-v2-1-1aaa82b07bc6@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/video')
| -rw-r--r-- | drivers/video/backlight/lcd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c index 77c5cb2a44e2..ba3e37b5b584 100644 --- a/drivers/video/backlight/lcd.c +++ b/drivers/video/backlight/lcd.c @@ -188,7 +188,7 @@ ATTRIBUTE_GROUPS(lcd_device); * or a pointer to the newly allocated device. */ struct lcd_device *lcd_device_register(const char *name, struct device *parent, - void *devdata, struct lcd_ops *ops) + void *devdata, const struct lcd_ops *ops) { struct lcd_device *new_ld; int rc; @@ -276,7 +276,7 @@ static int devm_lcd_device_match(struct device *dev, void *res, void *data) */ struct lcd_device *devm_lcd_device_register(struct device *dev, const char *name, struct device *parent, - void *devdata, struct lcd_ops *ops) + void *devdata, const struct lcd_ops *ops) { struct lcd_device **ptr, *lcd; |
