aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/printer.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-05-21 15:52:33 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-07-22 00:54:46 -0400
commitbc00bc924295f02295fe5eeeba3618ba0d0db1ef (patch)
treed13f926c627f2d892c20b714288ff85aeae89e37 /drivers/usb/gadget/printer.c
parent3d81252ddb10f63ae4db713d9b32faabe641b850 (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/gadget/printer.c')
-rw-r--r--drivers/usb/gadget/printer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index 9caaec3ae9a3..49cd9e145a9b 100644
--- a/drivers/usb/gadget/printer.c
+++ b/drivers/usb/gadget/printer.c
@@ -1360,8 +1360,8 @@ printer_bind(struct usb_gadget *gadget)
1360 1360
1361 1361
1362 /* Setup the sysfs files for the printer gadget. */ 1362 /* Setup the sysfs files for the printer gadget. */
1363 dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno, 1363 dev->pdev = device_create_drvdata(usb_gadget_class, NULL,
1364 "g_printer"); 1364 g_printer_devno, NULL, "g_printer");
1365 if (IS_ERR(dev->pdev)) { 1365 if (IS_ERR(dev->pdev)) {
1366 ERROR(dev, "Failed to create device: g_printer\n"); 1366 ERROR(dev, "Failed to create device: g_printer\n");
1367 goto fail; 1367 goto fail;