diff mbox

[RESEND,1/2] backlight: always update the brightness when poking "brightness"

Message ID 1231396340.20746.80.camel@rzhang-dt (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Zhang, Rui Jan. 8, 2009, 6:32 a.m. UTC
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 <rui.zhang@intel.com>
---
 drivers/video/backlight/backlight.c |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)



--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Richard Purdie Jan. 8, 2009, 2:12 p.m. UTC | #1
On Thu, 2009-01-08 at 14:32 +0800, Zhang Rui wrote:
> 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 <rui.zhang@intel.com>

Queued in the backlight tree, thanks.

Richard
diff mbox

Patch

Index: linux-2.6/drivers/video/backlight/backlight.c
===================================================================
--- linux-2.6.orig/drivers/video/backlight/backlight.c
+++ linux-2.6/drivers/video/backlight/backlight.c
@@ -134,10 +134,8 @@  static ssize_t backlight_store_brightnes
 		else {
 			pr_debug("backlight: set brightness to %d\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;
 		}
 	}