diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-05-21 12:52:33 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 21:54:46 -0700 |
commit | bc00bc924295f02295fe5eeeba3618ba0d0db1ef (patch) | |
tree | d13f926c627f2d892c20b714288ff85aeae89e37 /drivers/usb/core/file.c | |
parent | 3d81252ddb10f63ae4db713d9b32faabe641b850 (diff) |
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.c | 5 |
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; |