Add patch accepted for 2.6.25-rc4
authorHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 5 Mar 2008 22:57:45 +0000 (5 19:57 -0300)
committerHenrique de Moraes Holschuh <hmh@hmh.eng.br>
Wed, 5 Mar 2008 22:57:45 +0000 (5 19:57 -0300)
Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
releases/upstream/2.6.25-rc4/0001-ACPI-thinkpad-acpi-fix-hotkey_get_tablet_mode.patch [new file with mode: 0644]

diff --git a/releases/upstream/2.6.25-rc4/0001-ACPI-thinkpad-acpi-fix-hotkey_get_tablet_mode.patch b/releases/upstream/2.6.25-rc4/0001-ACPI-thinkpad-acpi-fix-hotkey_get_tablet_mode.patch
new file mode 100644 (file)
index 0000000..8539cae
--- /dev/null
@@ -0,0 +1,39 @@
+From cee47f5a32a1b5a1c8b148e738249946e3fedb95 Mon Sep 17 00:00:00 2001
+From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
+Date: Tue, 4 Mar 2008 14:29:21 -0800
+Subject: ACPI: thinkpad-acpi: fix hotkey_get_tablet_mode
+
+I used the wrong return convention on hotkey_get_tablet_mode(), breaking a lot
+of stuff.  Bad Henrique!
+
+Fix it to return the status in the parameter-by-reference, and IO status on
+the function return value.  Duh.
+
+Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
+Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com>
+Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
+Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
+Cc: Len Brown <lenb@kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+---
+ drivers/misc/thinkpad_acpi.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
+index bb269d0..6cb7812 100644
+--- a/drivers/misc/thinkpad_acpi.c
++++ b/drivers/misc/thinkpad_acpi.c
+@@ -1078,7 +1078,8 @@ static int hotkey_get_tablet_mode(int *status)
+       if (!acpi_evalf(hkey_handle, &s, "MHKG", "d"))
+               return -EIO;
+-      return ((s & TP_HOTKEY_TABLET_MASK) != 0);
++      *status = ((s & TP_HOTKEY_TABLET_MASK) != 0);
++      return 0;
+ }
+ /*
+-- 
+1.5.4.2
+