diff options
author | Henrique de Moraes Holschuh <hmh@hmh.eng.br> | 2007-03-08 03:28:15 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-03-08 20:24:57 -0500 |
commit | c9bf296b6467968ecb9d988e7ed754a19c2e63d9 (patch) | |
tree | 456f437ff2a68ce983de41fb3d2e218f9a7b9451 | |
parent | 2bc808a8c4821a8ef4e3dc35b8fc577a9d2c6f0d (diff) |
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: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Acked-by: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Len Brown <len.brown@intel.com>
-rw-r--r-- | drivers/acpi/ibm_acpi.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index e7309a668732..36901362fd24 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c | |||
@@ -86,6 +86,7 @@ | |||
86 | 86 | ||
87 | #include <linux/proc_fs.h> | 87 | #include <linux/proc_fs.h> |
88 | #include <linux/backlight.h> | 88 | #include <linux/backlight.h> |
89 | #include <linux/fb.h> | ||
89 | #include <asm/uaccess.h> | 90 | #include <asm/uaccess.h> |
90 | 91 | ||
91 | #include <linux/dmi.h> | 92 | #include <linux/dmi.h> |
@@ -1707,7 +1708,10 @@ static int brightness_write(char *buf) | |||
1707 | 1708 | ||
1708 | static int brightness_update_status(struct backlight_device *bd) | 1709 | static int brightness_update_status(struct backlight_device *bd) |
1709 | { | 1710 | { |
1710 | return brightness_set(bd->props.brightness); | 1711 | return brightness_set( |
1712 | (bd->props.fb_blank == FB_BLANK_UNBLANK && | ||
1713 | bd->props.power == FB_BLANK_UNBLANK) ? | ||
1714 | bd->props.brightness : 0); | ||
1711 | } | 1715 | } |
1712 | 1716 | ||
1713 | static struct backlight_ops ibm_backlight_data = { | 1717 | static struct backlight_ops ibm_backlight_data = { |