From: Greg Kroah-Hartman Date: Wed, 21 May 2008 19:52:33 +0000 (-0700) Subject: device create: hid: convert device_create to device_create_drvdata X-Git-Tag: v2.6.27-rc1~866^2~68 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0fd15a18d876a9571cc5b88a5d1716dfccb8e493;p=linux-2.6 device create: hid: 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. Signed-off-by: Jiri Kosina Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 2fde6c63f4..0c6b4d4e7e 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c @@ -322,8 +322,9 @@ int hidraw_connect(struct hid_device *hid) goto out; } - dev->dev = device_create(hidraw_class, NULL, MKDEV(hidraw_major, minor), - "%s%d", "hidraw", minor); + dev->dev = device_create_drvdata(hidraw_class, NULL, + MKDEV(hidraw_major, minor), NULL, + "%s%d", "hidraw", minor); if (IS_ERR(dev->dev)) { spin_lock(&minors_lock);