Skip to content

Commit

Permalink
bd->props.brightness doesn't reflect the actual backlight level.
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
  • Loading branch information
zhang-rui authored and rpurdie committed Jan 8, 2009
1 parent 0ec561f commit 9be1df9
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions drivers/video/backlight/backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 9be1df9

Please sign in to comment.