Skip to content

Commit

Permalink
backlight: Fix backlight limiting on spitz/corgi devices
Browse files Browse the repository at this point in the history
On spitz (& similar) machines, if battery is running low, backlight
needs
to be limited to lower step.  Unfortunately, current code uses &= for
limiting, turning backlight off completely for some backlight settings.
Fix that.

Signed-off-by: Pavel Machek <pavel@ucw.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
  • Loading branch information
Pavel Machek authored and Richard Purdie committed Nov 16, 2009
1 parent 1e0fa6b commit 716bdf1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/video/backlight/corgi_lcd.c
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,9 @@ static int corgi_bl_update_status(struct backlight_device *bd)

if (corgibl_flags & CORGIBL_SUSPENDED)
intensity = 0;
if (corgibl_flags & CORGIBL_BATTLOW)
intensity &= lcd->limit_mask;

if ((corgibl_flags & CORGIBL_BATTLOW) && intensity > lcd->limit_mask)
intensity = lcd->limit_mask;

return corgi_bl_set_intensity(lcd, intensity);
}
Expand Down

0 comments on commit 716bdf1

Please sign in to comment.