bd->props.brightness doesn't reflect the actual backlight level.
authorZhang Rui <rui.zhang@intel.com>
Thu, 8 Jan 2009 14:11:30 +0000 (14:11 +0000)
committerRichard Purdie <rpurdie@linux.intel.com>
Thu, 8 Jan 2009 14:11:30 +0000 (14:11 +0000)
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 <rui.zhang@intel.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
drivers/video/backlight/backlight.c

index 9593fdc042f731bccd0bed16f1cf730f0bfce8a9..a9c013bb9f20d0f0944e9f012bb325748bb074cd 100644 (file)
@@ -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;
                }
        }