aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon/hwmon.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 12:52:33 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 21:54:42 -0700
commit2871f55237e2aaa00fd724ce45b47e567974045f (patch)
tree59758a9d0e70615b015bdb79ccb97bfb8d7762f2 /drivers/hwmon/hwmon.c
parent0fd15a18d876a9571cc5b88a5d1716dfccb8e493 (diff)
downloadkernel_samsung_crespo-2871f55237e2aaa00fd724ce45b47e567974045f.zip
kernel_samsung_crespo-2871f55237e2aaa00fd724ce45b47e567974045f.tar.gz
kernel_samsung_crespo-2871f55237e2aaa00fd724ce45b47e567974045f.tar.bz2
device create: hwmon: convert device_create to device_create_drvdata
device_create() is race-prone, so use the race-free device_create_drvdata() instead as device_create() is going away. Cc: Mark M. Hoffman <mhoffman@lightlink.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hwmon/hwmon.c')
-rw-r--r--drivers/hwmon/hwmon.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c
index 3db2845..7321a88 100644
--- a/drivers/hwmon/hwmon.c
+++ b/drivers/hwmon/hwmon.c
@@ -55,7 +55,8 @@ again:
return ERR_PTR(err);
id = id & MAX_ID_MASK;
- hwdev = device_create(hwmon_class, dev, MKDEV(0,0), HWMON_ID_FORMAT, id);
+ hwdev = device_create_drvdata(hwmon_class, dev, MKDEV(0, 0), NULL,
+ HWMON_ID_FORMAT, id);
if (IS_ERR(hwdev)) {
spin_lock(&idr_lock);