Add patch accepted for 2.6.28-rc5
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 15 Nov 2008 12:51:16 +0000 (15 10:51 -0200)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Sat, 15 Nov 2008 12:51:16 +0000 (15 10:51 -0200)
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
releases/upstream/2.6.28-rc5/0001-thinkpad_acpi-fingers-off-backlight-if-video.ko-is.patch [new file with mode: 0644]

diff --git a/releases/upstream/2.6.28-rc5/0001-thinkpad_acpi-fingers-off-backlight-if-video.ko-is.patch b/releases/upstream/2.6.28-rc5/0001-thinkpad_acpi-fingers-off-backlight-if-video.ko-is.patch
new file mode 100644 (file)
index 0000000..3e189c7
--- /dev/null
@@ -0,0 +1,57 @@
+From 2dba1b5d87e08a294da5cdfa4d32908000e9b085 Mon Sep 17 00:00:00 2001
+From: Thomas Renninger <trenn@suse.de>
+Date: Fri, 1 Aug 2008 17:38:03 +0200
+Subject: [PATCH] thinkpad_acpi: fingers off backlight if video.ko is serving this functionality
+
+Signed-off-by: Thomas Renninger <trenn@suse.de>
+Acked-by: Zhang Rui <rui.zhang@intel.com>
+Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
+Signed-off-by: Andi Kleen <ak@linux.intel.com>
+Signed-off-by: Len Brown <len.brown@intel.com>
+---
+ drivers/misc/thinkpad_acpi.c |   29 +++++++++++++++++++----------
+ 1 files changed, 19 insertions(+), 10 deletions(-)
+
+diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
+index 4db1cf9..7a4a26b 100644
+--- a/drivers/misc/thinkpad_acpi.c
++++ b/drivers/misc/thinkpad_acpi.c
+@@ -4932,16 +4932,25 @@ static int __init brightness_init(struct ibm_init_struct *iibm)
+        */
+       b = tpacpi_check_std_acpi_brightness_support();
+       if (b > 0) {
+-              if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) {
+-                      printk(TPACPI_NOTICE
+-                             "Lenovo BIOS switched to ACPI backlight "
+-                             "control mode\n");
+-              }
+-              if (brightness_enable > 1) {
+-                      printk(TPACPI_NOTICE
+-                             "standard ACPI backlight interface "
+-                             "available, not loading native one...\n");
+-                      return 1;
++
++              if (acpi_video_backlight_support()) {
++                      if (brightness_enable > 1) {
++                              printk(TPACPI_NOTICE
++                                     "Standard ACPI backlight interface "
++                                     "available, not loading native one.\n");
++                              return 1;
++                      } else if (brightness_enable == 1) {
++                              printk(TPACPI_NOTICE
++                                     "Backlight control force enabled, even if standard "
++                                     "ACPI backlight interface is available\n");
++                      }
++              } else {
++                      if (brightness_enable > 1) {
++                              printk(TPACPI_NOTICE
++                                     "Standard ACPI backlight interface not "
++                                     "available, thinkpad_acpi native "
++                                     "brightness control enabled\n");
++                      }
+               }
+       }
+-- 
+1.5.6.5
+