diff options
author | Pavel Machek <pavel@ucw.cz> | 2009-11-06 15:58:31 +0000 |
---|---|---|
committer | Richard Purdie <rpurdie@linux.intel.com> | 2009-11-16 11:50:41 +0000 |
commit | 716bdf1874647196ac16dd2a1ad359d88844795a (patch) | |
tree | 55a5a7797d655bfd487ee3297323ba22faee1a08 | |
parent | 1e0fa6bd8c7468067f2e988c7a416dafd0651c34 (diff) |
backlight: Fix backlight limiting on spitz/corgi devices
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>
-rw-r--r-- | drivers/video/backlight/corgi_lcd.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c index 2211a852af9c..96774949cd30 100644 --- a/drivers/video/backlight/corgi_lcd.c +++ b/drivers/video/backlight/corgi_lcd.c @@ -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); } |