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 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c index bb269d0c677..6cb781262f9 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; } /* -- cgit v1.2.3