summaryrefslogtreecommitdiff
path: root/drivers/usb/core/file.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 23:52:33 +0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 08:54:46 +0400
commitbc00bc924295f02295fe5eeeba3618ba0d0db1ef (patch)
treed13f926c627f2d892c20b714288ff85aeae89e37 /drivers/usb/core/file.c
parent3d81252ddb10f63ae4db713d9b32faabe641b850 (diff)
downloadlinux-bc00bc924295f02295fe5eeeba3618ba0d0db1ef.tar.xz
device create: usb: 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: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/file.c')
-rw-r--r--drivers/usb/core/file.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 913fb8667899..6b1b229e38cd 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -196,8 +196,9 @@ int usb_register_dev(struct usb_interface *intf,
++temp;
else
temp = name;
- intf->usb_dev = device_create(usb_class->class, &intf->dev,
- MKDEV(USB_MAJOR, minor), "%s", temp);
+ intf->usb_dev = device_create_drvdata(usb_class->class, &intf->dev,
+ MKDEV(USB_MAJOR, minor), NULL,
+ "%s", temp);
if (IS_ERR(intf->usb_dev)) {
down_write(&minor_rwsem);
usb_minors[intf->minor] = NULL;