mirror of https://github.com/torvalds/linux.git
fbdev: lcdcfb: Use backlight helper
Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> Signed-off-by: Helge Deller <deller@gmx.de>
This commit is contained in:
parent
c542a56aad
commit
d08e78362a
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue