From 8254b4e606db1a15b7ac53aa3bda19f15e14745e Mon Sep 17 00:00:00 2001 From: Henrique de Moraes Holschuh Date: Wed, 5 Mar 2008 19:57:45 -0300 Subject: [PATCH] Add patch accepted for 2.6.25-rc4 Signed-off-by: Henrique de Moraes Holschuh --- ...-thinkpad-acpi-fix-hotkey_get_tablet_mode.patch | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 releases/upstream/2.6.25-rc4/0001-ACPI-thinkpad-acpi-fix-hotkey_get_tablet_mode.patch 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 index 00000000000..8539caec1d9 --- /dev/null +++ b/releases/upstream/2.6.25-rc4/0001-ACPI-thinkpad-acpi-fix-hotkey_get_tablet_mode.patch @@ -0,0 +1,39 @@ +From cee47f5a32a1b5a1c8b148e738249946e3fedb95 Mon Sep 17 00:00:00 2001 +From: Henrique de Moraes Holschuh +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 +Cc: Zdenek Kabelac +Cc: "Rafael J. Wysocki" +Cc: Lukas Hejtmanek +Cc: Len Brown +Signed-off-by: Andrew Morton +Signed-off-by: Linus Torvalds +--- + 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 + -- 2.11.4.GIT