From c9bf296b6467968ecb9d988e7ed754a19c2e63d9 Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Thu, 8 Mar 2007 05:28:15 -0300 Subject: [PATCH] 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 --- drivers/acpi/ibm_acpi.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 = { -- 2.41.0