From: Zhang Rui Date: Thu, 8 Jan 2009 14:11:30 +0000 (+0000) Subject: bd->props.brightness doesn't reflect the actual backlight level. X-Git-Tag: v2.6.29-rc1~26^2~3 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9be1df98bca44dbe3769cd22f4ab8122b76c5313;p=linux-2.6-omap-h63xx.git bd->props.brightness doesn't reflect the actual backlight level. Always invoke backlight_update_status when users want to change the backlight. For setups where brightness change is an expensive operation, this could be done in the driver rather than the core. http://bugzilla.kernel.org/show_bug.cgi?id=12249 Signed-off-by: Zhang Rui Signed-off-by: Richard Purdie --- diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 9593fdc042f..a9c013bb9f2 100644 --- a/drivers/video/backlight/backlight.c +++ b/drivers/video/backlight/backlight.c @@ -131,10 +131,8 @@ static ssize_t backlight_store_brightness(struct device *dev, else { pr_debug("backlight: set brightness to %lu\n", brightness); - if (bd->props.brightness != brightness) { - bd->props.brightness = brightness; - backlight_update_status(bd); - } + bd->props.brightness = brightness; + backlight_update_status(bd); rc = count; } }