Commit c9bf296b authored by Henrique de Moraes Holschuh's avatar Henrique de Moraes Holschuh Committed by Len Brown

ACPI: ibm-acpi: improve backlight power handling

Improve the backlight code to emulate as much as possible the power
management events, as we are unable to really power on or power off the
backlight.
Signed-off-by: default avatarHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: default avatarRichard Purdie <rpurdie@rpsys.net>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 2bc808a8
......@@ -86,6 +86,7 @@
#include <linux/proc_fs.h>
#include <linux/backlight.h>
#include <linux/fb.h>
#include <asm/uaccess.h>
#include <linux/dmi.h>
......@@ -1707,7 +1708,10 @@ static int brightness_write(char *buf)
static int brightness_update_status(struct backlight_device *bd)
{
return brightness_set(bd->props.brightness);
return brightness_set(
(bd->props.fb_blank == FB_BLANK_UNBLANK &&
bd->props.power == FB_BLANK_UNBLANK) ?
bd->props.brightness : 0);
}
static struct backlight_ops ibm_backlight_data = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment