diff options
author | Alexandre Courbot <acourbot@nvidia.com> | 2013-01-30 01:19:15 -0500 |
---|---|---|
committer | Thierry Reding <thierry.reding@avionic-design.de> | 2013-01-30 02:52:00 -0500 |
commit | 0132267d659107616eb044777f1b0be55381129a (patch) | |
tree | b583dd1eafb39ee800528a213018b3a300589861 /drivers/video | |
parent | 0d75c203effefa4f62ca4d30bf52bd9ec246717f (diff) |
pwm-backlight: handle BL_CORE_FBBLANK state
According to include/linux/backlight.h, the fb_blank field is to be
removed and blank status should preferably be set by setting the
BL_CORE_FBBLANK bit of the state field. This patch ensures this
condition is also taken into account when updating the backlight state.
Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/backlight/pwm_bl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/video/backlight/pwm_bl.c b/drivers/video/backlight/pwm_bl.c index 069983ca49ff..4af6d1302f17 100644 --- a/drivers/video/backlight/pwm_bl.c +++ b/drivers/video/backlight/pwm_bl.c | |||
@@ -41,10 +41,9 @@ static int pwm_backlight_update_status(struct backlight_device *bl) | |||
41 | int brightness = bl->props.brightness; | 41 | int brightness = bl->props.brightness; |
42 | int max = bl->props.max_brightness; | 42 | int max = bl->props.max_brightness; |
43 | 43 | ||
44 | if (bl->props.power != FB_BLANK_UNBLANK) | 44 | if (bl->props.power != FB_BLANK_UNBLANK || |
45 | brightness = 0; | 45 | bl->props.fb_blank != FB_BLANK_UNBLANK || |
46 | 46 | bl->props.state & BL_CORE_FBBLANK) | |
47 | if (bl->props.fb_blank != FB_BLANK_UNBLANK) | ||
48 | brightness = 0; | 47 | brightness = 0; |
49 | 48 | ||
50 | if (pb->notify) | 49 | if (pb->notify) |