提交 cee47f5a 编写于 作者: H Henrique de Moraes Holschuh 提交者: Linus Torvalds

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: NHenrique 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: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 acc1f3ed
......@@ -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;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册