From: Henrique de Moraes Holschuh 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 --- drivers/misc/thinkpad_acpi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff -puN drivers/misc/thinkpad_acpi.c~acpi-thinkpad-acpi-fix-hotkey_get_tablet_mode drivers/misc/thinkpad_acpi.c --- a/drivers/misc/thinkpad_acpi.c~acpi-thinkpad-acpi-fix-hotkey_get_tablet_mode +++ a/drivers/misc/thinkpad_acpi.c @@ -1078,7 +1078,8 @@ static int hotkey_get_tablet_mode(int *s 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; } /* _