From: Henrique de Moraes Holschuh Date: Tue, 4 Mar 2008 22:29:21 +0000 (-0800) Subject: ACPI: thinkpad-acpi: fix hotkey_get_tablet_mode X-Git-Tag: v2.6.25-rc4~29 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=cee47f5a32a1b5a1c8b148e738249946e3fedb95;p=linux-2.6-omap-h63xx.git 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 --- 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; } /*