[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1204063955-5739-1-git-send-email-hmh@hmh.eng.br>
Date: Tue, 26 Feb 2008 19:12:35 -0300
From: Henrique de Moraes Holschuh <hmh@....eng.br>
To: lenb@...nel.org
Cc: ibm-acpi-devel@...ts.sourceforge.net, linux-acpi@...r.kernel.org,
linux-kernel@...r.kernel.org,
Henrique de Moraes Holschuh <hmh@....eng.br>,
Zdenek Kabelac <zdenek.kabelac@...il.com>,
"Rafael J. Wysocki" <rjw@...k.pl>,
Lukas Hejtmanek <xhejtman@....muni.cz>
Subject: 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 <hmh@....eng.br>
Cc: Zdenek Kabelac <zdenek.kabelac@...il.com>
Cc: "Rafael J. Wysocki" <rjw@...k.pl>
Cc: Lukas Hejtmanek <xhejtman@....muni.cz>
---
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 bb269d0..6cb7812 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;
}
/*
--
1.5.4.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists