diff options
author | Henrique de Moraes Holschuh <[email protected]> | 2008-03-04 14:29:21 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2008-03-04 16:35:16 -0800 |
commit | cee47f5a32a1b5a1c8b148e738249946e3fedb95 (patch) | |
tree | 1776a535ca8a89dc91e2fbe664433d77b258929f | |
parent | acc1f3ede977bf189b332874beeadf48c01544c5 (diff) |
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 <[email protected]>
Cc: Zdenek Kabelac <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Lukas Hejtmanek <[email protected]>
Cc: Len Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | 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 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; } /* |