aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorPavel Machek <pavel@ucw.cz>2009-11-06 10:58:31 -0500
committerRichard Purdie <rpurdie@linux.intel.com>2009-11-16 06:50:41 -0500
commit716bdf1874647196ac16dd2a1ad359d88844795a (patch)
tree55a5a7797d655bfd487ee3297323ba22faee1a08 /drivers/video
parent1e0fa6bd8c7468067f2e988c7a416dafd0651c34 (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>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/backlight/corgi_lcd.c5
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)
433 433
434 if (corgibl_flags & CORGIBL_SUSPENDED) 434 if (corgibl_flags & CORGIBL_SUSPENDED)
435 intensity = 0; 435 intensity = 0;
436 if (corgibl_flags & CORGIBL_BATTLOW) 436
437 intensity &= lcd->limit_mask; 437 if ((corgibl_flags & CORGIBL_BATTLOW) && intensity > lcd->limit_mask)
438 intensity = lcd->limit_mask;
438 439
439 return corgi_bl_set_intensity(lcd, intensity); 440 return corgi_bl_set_intensity(lcd, intensity);
440} 441}