Add patch accepted for 2.6.25-rc4
[linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git] / releases / upstream / 2.6.25-rc4 / 0001-ACPI-thinkpad-acpi-fix-hotkey_get_tablet_mode.patch
blob8539caec1d9e955349c1b32f6ad7ba867525e24e
1 From cee47f5a32a1b5a1c8b148e738249946e3fedb95 Mon Sep 17 00:00:00 2001
2 From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
3 Date: Tue, 4 Mar 2008 14:29:21 -0800
4 Subject: ACPI: thinkpad-acpi: fix hotkey_get_tablet_mode
6 I used the wrong return convention on hotkey_get_tablet_mode(), breaking a lot
7 of stuff. Bad Henrique!
9 Fix it to return the status in the parameter-by-reference, and IO status on
10 the function return value. Duh.
12 Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
13 Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com>
14 Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
15 Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
16 Cc: Len Brown <lenb@kernel.org>
17 Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
18 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
19 ---
20 drivers/misc/thinkpad_acpi.c | 3 ++-
21 1 files changed, 2 insertions(+), 1 deletions(-)
23 diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
24 index bb269d0..6cb7812 100644
25 --- a/drivers/misc/thinkpad_acpi.c
26 +++ b/drivers/misc/thinkpad_acpi.c
27 @@ -1078,7 +1078,8 @@ static int hotkey_get_tablet_mode(int *status)
28 if (!acpi_evalf(hkey_handle, &s, "MHKG", "d"))
29 return -EIO;
31 - return ((s & TP_HOTKEY_TABLET_MASK) != 0);
32 + *status = ((s & TP_HOTKEY_TABLET_MASK) != 0);
33 + return 0;
37 --
38 1.5.4.2