backlight: platform_lcd: Constify lcd_ops
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 24 Apr 2024 06:33:39 +0000 (08:33 +0200)
committerLee Jones <lee@kernel.org>
Fri, 3 May 2024 09:45:28 +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: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/20240424-video-backlight-lcd-ops-v2-13-1aaa82b07bc6@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/platform_lcd.c

index dc37494baf42abe97c958dc6761e80fe13353d8b..76872f5c34c5a9bb198d5a68df7e9fa167362cb8 100644 (file)
@@ -62,7 +62,7 @@ static int platform_lcd_match(struct lcd_device *lcd, struct fb_info *info)
        return plcd->us->parent == info->device;
 }
 
-static struct lcd_ops platform_lcd_ops = {
+static const struct lcd_ops platform_lcd_ops = {
        .get_power      = platform_lcd_get_power,
        .set_power      = platform_lcd_set_power,
        .check_fb       = platform_lcd_match,