diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 21:52:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-22 06:54:42 +0200 |
commit | 0fd15a18d876a9571cc5b88a5d1716dfccb8e493 (patch) | |
tree | 96958e18b5f446890fbd7c1be70ae9f4326d25f8 /drivers/hid/hidraw.c | |
parent | device create: framebuffer: convert device_create to device_create_drvdata (diff) | |
download | linux-0fd15a18d876a9571cc5b88a5d1716dfccb8e493.tar.xz linux-0fd15a18d876a9571cc5b88a5d1716dfccb8e493.zip |
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/hidraw.c')
-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) 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); |