lkml.org 
[lkml]   [2006]   [Aug]   [15]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
DateWed, 16 Aug 2006 01:26:07 +0300
From"Shem Multinymous" <>
Subject[-mm patch] hdaps: Add explicit hardware configuration functions - fix
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@gmail.com>
---
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@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-08-16 00:29    [from the cache]
©2003-2008