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-Url: https://git.stricted.de/?a=commitdiff_plain;h=c9bf296b6467968ecb9d988e7ed754a19c2e63d9;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.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 e7309a668732..36901362fd24 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 = {