From: Shixiong Ou Date: Tue, 21 Jan 2025 06:42:36 +0000 (+0800) Subject: fbdev: lcdcfb: Use backlight helper X-Git-Tag: v6.14-rc1~109^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d08e78362a5f5e156b6a1dae90c28ed48c0a8357;p=thirdparty%2Flinux.git fbdev: lcdcfb: Use backlight helper Signed-off-by: Shixiong Ou Signed-off-by: Helge Deller --- diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 935cd8413ed58..4715dcb598115 100644 --- a/drivers/video/fbdev/sh_mobile_lcdcfb.c +++ b/drivers/video/fbdev/sh_mobile_lcdcfb.c @@ -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);