Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c9bf296b6467968ecb9d988e7ed754a19c2e63d9
Commit:     c9bf296b6467968ecb9d988e7ed754a19c2e63d9
Parent:     2bc808a8c4821a8ef4e3dc35b8fc577a9d2c6f0d
Author:     Henrique de Moraes Holschuh <[EMAIL PROTECTED]>
AuthorDate: Thu Mar 8 05:28:15 2007 -0300
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Thu Mar 8 20:24:57 2007 -0500

    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 <[EMAIL PROTECTED]>
    Acked-by: Richard Purdie <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 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 e7309a6..3690136 100644
--- a/drivers/acpi/ibm_acpi.c
+++ b/drivers/acpi/ibm_acpi.c
@@ -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 = {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to