[-mm patch] hdaps: Add explicit hardware configuration functions - fix

From: Shem Multinymous
Date: Tue Aug 15 2006 - 18:23:37 EST


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 <multinymous@xxxxxxxxx>
---
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/