summaryrefslogtreecommitdiffstats
path: root/drivers/video/sh_mobile_lcdcfb.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-08-15 18:10:03 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2012-11-21 15:50:01 +0100
commit656d4f332c02b14e62fe3f4247a1dcdc33961de6 (patch)
tree899b8e3bb7c5abb1283e5450c6c8e872884871f6 /drivers/video/sh_mobile_lcdcfb.c
parentfbdev: sh_mipi_dsi: Remove the unused sh_mipi_dsi_info lcd_chan field (diff)
downloadlinux-656d4f332c02b14e62fe3f4247a1dcdc33961de6.tar.xz
linux-656d4f332c02b14e62fe3f4247a1dcdc33961de6.zip
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>
Diffstat (limited to 'drivers/video/sh_mobile_lcdcfb.c')
-rw-r--r--drivers/video/sh_mobile_lcdcfb.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/video/sh_mobile_lcdcfb.c b/drivers/video/sh_mobile_lcdcfb.c
index c169581c3a72..dd8dd41b4acd 100644
--- a/drivers/video/sh_mobile_lcdcfb.c
+++ b/drivers/video/sh_mobile_lcdcfb.c
@@ -2282,6 +2282,7 @@ static int sh_mobile_lcdc_update_bl(struct backlight_device *bdev)
bdev->props.state & (BL_CORE_SUSPENDED | BL_CORE_FBBLANK))
brightness = 0;
+ ch->bl_brightness = brightness;
return ch->cfg->bl_info.set_brightness(brightness);
}
@@ -2289,7 +2290,7 @@ static int sh_mobile_lcdc_get_brightness(struct backlight_device *bdev)
{
struct sh_mobile_lcdc_chan *ch = bl_get_data(bdev);
- return ch->cfg->bl_info.get_brightness();
+ return ch->bl_brightness;
}
static int sh_mobile_lcdc_check_fb(struct backlight_device *bdev,