Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fbdev: sh_mobile_lcdc: Store the backlight brightness internally

There's no need to query the hardware for the currenty brightness value
through a platform data callback when we can cache the value internally
in the LCDC driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

+3 -1
+2 -1
drivers/video/sh_mobile_lcdcfb.c
··· 2282 2282 bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK)) 2283 2283 brightness = 0; 2284 2284 2285 + ch->bl_brightness = brightness; 2285 2286 return ch->cfg->bl_info.set_brightness(brightness); 2286 2287 } 2287 2288 ··· 2290 2289 { 2291 2290 struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev); 2292 2291 2293 - return ch->cfg->bl_info.get_brightness(); 2292 + return ch->bl_brightness; 2294 2293 } 2295 2294 2296 2295 static int sh_mobile_lcdc_check_fb(struct backlight_device *bdev,
+1
drivers/video/sh_mobile_lcdcfb.h
··· 94 94 95 95 /* Backlight */ 96 96 struct backlight_device *bl; 97 + unsigned int bl_brightness; 97 98 98 99 /* FB */ 99 100 struct fb_info *info;