Skip to content

Commit d08e783

Browse files
Shixiong Ouhdeller
authored andcommitted
fbdev: lcdcfb: Use backlight helper
Signed-off-by: Shixiong Ou <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent c542a56 commit d08e783

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/video/fbdev/sh_mobile_lcdcfb.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,11 +2123,7 @@ sh_mobile_lcdc_channel_fb_init(struct sh_mobile_lcdc_chan *ch,
21232123
static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev)
21242124
{
21252125
struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev);
2126-
int brightness = bdev->props.brightness;
2127-
2128-
if (bdev->props.power != BACKLIGHT_POWER_ON ||
2129-
bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
2130-
brightness = 0;
2126+
int brightness = backlight_get_brightness(bdev);
21312127

21322128
ch->bl_brightness = brightness;
21332129
return ch->cfg->bl_info.set_brightness(brightness);

0 commit comments

Comments
 (0)