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: firefly_0821_release~22127 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=cee47f5a32a1b5a1c8b148e738249946e3fedb95;p=firefly-linux-kernel-4.4.55.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 bb269d0c677e..6cb781262f94 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; } /*