diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 19:52:33 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 04:54:42 (GMT) |
commit | 0fd15a18d876a9571cc5b88a5d1716dfccb8e493 (patch) | |
tree | 96958e18b5f446890fbd7c1be70ae9f4326d25f8 | |
parent | 1e2744011ff3cd195aba9f7a15dd71b332812a5c (diff) | |
download | linux-0fd15a18d876a9571cc5b88a5d1716dfccb8e493.tar.xz |
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>
-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 2fde6c6..0c6b4d4 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); |