summaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorShixiong Ou <oushixiong@kylinos.cn>2025-01-21 14:42:36 +0800
committerHelge Deller <deller@gmx.de>2025-01-21 14:16:39 +0100
commitd08e78362a5f5e156b6a1dae90c28ed48c0a8357 (patch)
treee9e13db1810d0f6cbfe385639399be2f4d2eb282 /drivers/video
parentc542a56aad1f88b88713293c128952feb1945301 (diff)
downloadlinux-d08e78362a5f5e156b6a1dae90c28ed48c0a8357.tar.gz
linux-d08e78362a5f5e156b6a1dae90c28ed48c0a8357.tar.bz2
linux-d08e78362a5f5e156b6a1dae90c28ed48c0a8357.zip
fbdev: lcdcfb: Use backlight helper
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/sh_mobile_lcdcfb.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c
index 935cd8413ed5..4715dcb59811 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);