From 9bf34b47f8c9dd2b0f33c899653f2180b2d698c6 Mon Sep 17 00:00:00 2001 From: Zhang Rui Date: Sat, 14 Nov 2009 00:56:33 -0200 Subject: [PATCH] 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 --- drivers/video/backlight/backlight.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/video/backlight/backlight.c b/drivers/video/backlight/backlight.c index 592d71491d2..26162929767 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; } } -- 2.11.4.GIT