Fixes two things about hdaps_check_ec() in the hdaps driver:
1. Remove the __init, it may be called well after module init, during resume.
2. Remove an unused parameter.
Signed-off-by: Shem Multinymous <[email protected]>
---
This applies on top of
hdaps-add-explicit-hardware-configuration-functions.patch
currently in -mm
(LKML: "[PATCH 08/12] hdaps: Add explicit hardware configuration functions").
Andrew, do you prefer to get the full rolled-up patch in such cases?
--- a/drivers/hwmon/hdaps.c
+++ b/drivers/hwmon/hdaps.c
@@ -305,7 +305,7 @@ static int hdaps_get_ec_mode(u8 *mode)
* Follows the clean-room spec for HDAPS; we don't know what it means.
* Returns zero on success and negative error code on failure. Can sleep.
*/
-static int __init hdaps_check_ec(u8 *mode)
+static int hdaps_check_ec()
{
const struct thinkpad_ec_row args =
{ .mask=0x0003, .val={0x17, 0x81} };
@@ -343,7 +343,7 @@ static int hdaps_device_init(void)
if (mode==0x00)
{ ABORT_INIT("accelerometer not available"); goto bad; }
- if (hdaps_check_ec(&mode))
+ if (hdaps_check_ec())
{ ABORT_INIT("hdaps_check_ec failed"); goto bad; }
if (hdaps_set_power(1))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]