mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
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>
This commit is contained in:
parent
1e0fa6bd8c
commit
716bdf1874
1 changed files with 3 additions and 2 deletions
|
@ -433,8 +433,9 @@ static int corgi_bl_update_status(struct backlight_device *bd)
|
||||||
|
|
||||||
if (corgibl_flags & CORGIBL_SUSPENDED)
|
if (corgibl_flags & CORGIBL_SUSPENDED)
|
||||||
intensity = 0;
|
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);
|
return corgi_bl_set_intensity(lcd, intensity);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue