]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
fbdev: lcdcfb: Use backlight helper
authorShixiong Ou <oushixiong@kylinos.cn>
Tue, 21 Jan 2025 06:42:36 +0000 (14:42 +0800)
committerHelge Deller <deller@gmx.de>
Tue, 21 Jan 2025 13:16:39 +0000 (14:16 +0100)
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn>
Signed-off-by: Helge Deller <deller@gmx.de>
drivers/video/fbdev/sh_mobile_lcdcfb.c

index 935cd8413ed58db4e643737fbc5d7fb992c322d7..4715dcb59811507abf801e1dc890c245ba888389 100644 (file)
@@ -2123,11 +2123,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
 static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev)
 {
        struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev);
-       int brightness = bdev->props.brightness;
-
-       if (bdev->props.power != BACKLIGHT_POWER_ON ||
-           bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
-               brightness = 0;
+       int brightness = backlight_get_brightness(bdev);
 
        ch->bl_brightness = brightness;
        return ch->cfg->bl_info.set_brightness(brightness);