Message ID | 20250121064236.168236-1-oushixiong1025@163.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | fbdev/sh_mobile_lcdcfb: Use backlight helper | expand |
On 1/21/25 07:42, oushixiong1025@163.com wrote: > From: Shixiong Ou <oushixiong@kylinos.cn> > > Signed-off-by: Shixiong Ou <oushixiong@kylinos.cn> > --- > drivers/video/fbdev/sh_mobile_lcdcfb.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) That patch did not apply any longer to git head. I fixed it up manually and applied it to fbdev git tree. Thanks! Helge > > diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c > index 6b37b188af31..69c9067eff88 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 != FB_BLANK_UNBLANK || > - 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);
diff --git a/drivers/video/fbdev/sh_mobile_lcdcfb.c b/drivers/video/fbdev/sh_mobile_lcdcfb.c index 6b37b188af31..69c9067eff88 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 != FB_BLANK_UNBLANK || - 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);