diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 15:52:33 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 00:54:42 -0400 |
commit | 0fd15a18d876a9571cc5b88a5d1716dfccb8e493 (patch) | |
tree | 96958e18b5f446890fbd7c1be70ae9f4326d25f8 /drivers/hid | |
parent | 1e2744011ff3cd195aba9f7a15dd71b332812a5c (diff) |
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 <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hidraw.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index 2fde6c63f47d..0c6b4d4e7e27 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -322,8 +322,9 @@ int hidraw_connect(struct hid_device *hid) | |||
322 | goto out; | 322 | goto out; |
323 | } | 323 | } |
324 | 324 | ||
325 | dev->dev = device_create(hidraw_class, NULL, MKDEV(hidraw_major, minor), | 325 | dev->dev = device_create_drvdata(hidraw_class, NULL, |
326 | "%s%d", "hidraw", minor); | 326 | MKDEV(hidraw_major, minor), NULL, |
327 | "%s%d", "hidraw", minor); | ||
327 | 328 | ||
328 | if (IS_ERR(dev->dev)) { | 329 | if (IS_ERR(dev->dev)) { |
329 | spin_lock(&minors_lock); | 330 | spin_lock(&minors_lock); |