Skip to content

Commit

Permalink
ACPI: thinkpad-acpi: fix hotkey_get_tablet_mode
Browse files Browse the repository at this point in the history
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 <hmh@hmh.eng.br>
Cc: Zdenek Kabelac <zdenek.kabelac@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Lukas Hejtmanek <xhejtman@ics.muni.cz>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Henrique de Moraes Holschuh authored and Linus Torvalds committed Mar 5, 2008
1 parent acc1f3e commit cee47f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/misc/thinkpad_acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/*
Expand Down

0 comments on commit cee47f5

Please sign in to comment.