From: Greg Kroah-Hartman Date: Wed, 21 May 2008 19:52:33 +0000 (-0700) Subject: device create: hwmon: convert device_create to device_create_drvdata X-Git-Tag: v2.6.27-rc1~866^2~67 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2871f55237e2aaa00fd724ce45b47e567974045f;p=linux-2.6-omap-h63xx.git 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 Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hwmon/hwmon.c b/drivers/hwmon/hwmon.c index 3db28450a3b..7321a88a511 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);