From: Henrique de Moraes Holschuh Date: Thu, 8 Mar 2007 08:28:15 +0000 (-0300) Subject: ACPI: ibm-acpi: improve backlight power handling X-Git-Tag: v2.6.21-rc4~63^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c9bf296b6467968ecb9d988e7ed754a19c2e63d9;p=linux-2.6-omap-h63xx.git 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 Acked-by: Richard Purdie Signed-off-by: Len Brown --- diff --git a/drivers/acpi/ibm_acpi.c b/drivers/acpi/ibm_acpi.c index e7309a66873..36901362fd2 100644 --- a/drivers/acpi/ibm_acpi.c +++ b/drivers/acpi/ibm_acpi.c @@ -86,6 +86,7 @@ #include #include +#include #include #include @@ -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 = {