aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-07-21 23:03:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-16 12:24:45 -0400
commitb0b090e5792fa228b5c825fcc5e1b7b0da7abec9 (patch)
tree217d6f95fb63c158383beb026e8fb45ce6fd873e
parentabe9ab8f62203ced11119fb96acc3b8dd107ebc4 (diff)
device create: usb: convert device_create_drvdata to device_create
Now that device_create() has been audited, rename things back to the original call to be sane. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/core/devio.c6
-rw-r--r--drivers/usb/core/file.c6
-rw-r--r--drivers/usb/core/hcd.c5
-rw-r--r--drivers/usb/gadget/printer.c4
-rw-r--r--drivers/usb/misc/phidgetkit.c5
-rw-r--r--drivers/usb/misc/phidgetmotorcontrol.c5
-rw-r--r--drivers/usb/misc/phidgetservo.c5
-rw-r--r--drivers/usb/mon/mon_bin.c6
8 files changed, 19 insertions, 23 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c
index 20290c5b1562..7a4fa791dc19 100644
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1729,9 +1729,9 @@ static int usb_classdev_add(struct usb_device *dev)
1729{ 1729{
1730 struct device *cldev; 1730 struct device *cldev;
1731 1731
1732 cldev = device_create_drvdata(usb_classdev_class, &dev->dev, 1732 cldev = device_create(usb_classdev_class, &dev->dev, dev->dev.devt,
1733 dev->dev.devt, NULL, "usbdev%d.%d", 1733 NULL, "usbdev%d.%d", dev->bus->busnum,
1734 dev->bus->busnum, dev->devnum); 1734 dev->devnum);
1735 if (IS_ERR(cldev)) 1735 if (IS_ERR(cldev))
1736 return PTR_ERR(cldev); 1736 return PTR_ERR(cldev);
1737 dev->usb_classdev = cldev; 1737 dev->usb_classdev = cldev;
diff --git a/drivers/usb/core/file.c b/drivers/usb/core/file.c
index 6b1b229e38cd..55f7f310924b 100644
--- a/drivers/usb/core/file.c
+++ b/drivers/usb/core/file.c
@@ -196,9 +196,9 @@ int usb_register_dev(struct usb_interface *intf,
196 ++temp; 196 ++temp;
197 else 197 else
198 temp = name; 198 temp = name;
199 intf->usb_dev = device_create_drvdata(usb_class->class, &intf->dev, 199 intf->usb_dev = device_create(usb_class->class, &intf->dev,
200 MKDEV(USB_MAJOR, minor), NULL, 200 MKDEV(USB_MAJOR, minor), NULL,
201 "%s", temp); 201 "%s", temp);
202 if (IS_ERR(intf->usb_dev)) { 202 if (IS_ERR(intf->usb_dev)) {
203 down_write(&minor_rwsem); 203 down_write(&minor_rwsem);
204 usb_minors[intf->minor] = NULL; 204 usb_minors[intf->minor] = NULL;
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c
index 8ab389dca2b9..c8035a8216bd 100644
--- a/drivers/usb/core/hcd.c
+++ b/drivers/usb/core/hcd.c
@@ -818,9 +818,8 @@ static int usb_register_bus(struct usb_bus *bus)
818 set_bit (busnum, busmap.busmap); 818 set_bit (busnum, busmap.busmap);
819 bus->busnum = busnum; 819 bus->busnum = busnum;
820 820
821 bus->dev = device_create_drvdata(usb_host_class, bus->controller, 821 bus->dev = device_create(usb_host_class, bus->controller, MKDEV(0, 0),
822 MKDEV(0, 0), bus, 822 bus, "usb_host%d", busnum);
823 "usb_host%d", busnum);
824 result = PTR_ERR(bus->dev); 823 result = PTR_ERR(bus->dev);
825 if (IS_ERR(bus->dev)) 824 if (IS_ERR(bus->dev))
826 goto error_create_class_dev; 825 goto error_create_class_dev;
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c
index e0090085b78e..7a8d4a188528 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_drvdata(usb_gadget_class, NULL, 1363 dev->pdev = device_create(usb_gadget_class, NULL, g_printer_devno,
1364 g_printer_devno, NULL, "g_printer"); 1364 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;
diff --git a/drivers/usb/misc/phidgetkit.c b/drivers/usb/misc/phidgetkit.c
index 4cfa25b0f44e..cc8e0a926f99 100644
--- a/drivers/usb/misc/phidgetkit.c
+++ b/drivers/usb/misc/phidgetkit.c
@@ -595,9 +595,8 @@ static int interfacekit_probe(struct usb_interface *intf, const struct usb_devic
595 } while(value); 595 } while(value);
596 kit->dev_no = bit; 596 kit->dev_no = bit;
597 597
598 kit->dev = device_create_drvdata(phidget_class, &kit->udev->dev, 598 kit->dev = device_create(phidget_class, &kit->udev->dev, MKDEV(0, 0),
599 MKDEV(0, 0), kit, 599 kit, "interfacekit%d", kit->dev_no);
600 "interfacekit%d", kit->dev_no);
601 if (IS_ERR(kit->dev)) { 600 if (IS_ERR(kit->dev)) {
602 rc = PTR_ERR(kit->dev); 601 rc = PTR_ERR(kit->dev);
603 kit->dev = NULL; 602 kit->dev = NULL;
diff --git a/drivers/usb/misc/phidgetmotorcontrol.c b/drivers/usb/misc/phidgetmotorcontrol.c
index 9b4696f21b22..38088b44349e 100644
--- a/drivers/usb/misc/phidgetmotorcontrol.c
+++ b/drivers/usb/misc/phidgetmotorcontrol.c
@@ -365,9 +365,8 @@ static int motorcontrol_probe(struct usb_interface *intf, const struct usb_devic
365 } while(value); 365 } while(value);
366 mc->dev_no = bit; 366 mc->dev_no = bit;
367 367
368 mc->dev = device_create_drvdata(phidget_class, &mc->udev->dev, 368 mc->dev = device_create(phidget_class, &mc->udev->dev, MKDEV(0, 0), mc,
369 MKDEV(0, 0), mc, 369 "motorcontrol%d", mc->dev_no);
370 "motorcontrol%d", mc->dev_no);
371 if (IS_ERR(mc->dev)) { 370 if (IS_ERR(mc->dev)) {
372 rc = PTR_ERR(mc->dev); 371 rc = PTR_ERR(mc->dev);
373 mc->dev = NULL; 372 mc->dev = NULL;
diff --git a/drivers/usb/misc/phidgetservo.c b/drivers/usb/misc/phidgetservo.c
index 1ca7ddb41d4d..bef6fe16364b 100644
--- a/drivers/usb/misc/phidgetservo.c
+++ b/drivers/usb/misc/phidgetservo.c
@@ -275,9 +275,8 @@ servo_probe(struct usb_interface *interface, const struct usb_device_id *id)
275 } while (value); 275 } while (value);
276 dev->dev_no = bit; 276 dev->dev_no = bit;
277 277
278 dev->dev = device_create_drvdata(phidget_class, &dev->udev->dev, 278 dev->dev = device_create(phidget_class, &dev->udev->dev, MKDEV(0, 0),
279 MKDEV(0, 0), dev, 279 dev, "servo%d", dev->dev_no);
280 "servo%d", dev->dev_no);
281 if (IS_ERR(dev->dev)) { 280 if (IS_ERR(dev->dev)) {
282 rc = PTR_ERR(dev->dev); 281 rc = PTR_ERR(dev->dev);
283 dev->dev = NULL; 282 dev->dev = NULL;
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index 6566fc0a3228..c9de3f027aab 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -1162,9 +1162,9 @@ int mon_bin_add(struct mon_bus *mbus, const struct usb_bus *ubus)
1162 if (minor >= MON_BIN_MAX_MINOR) 1162 if (minor >= MON_BIN_MAX_MINOR)
1163 return 0; 1163 return 0;
1164 1164
1165 dev = device_create_drvdata(mon_bin_class, ubus? ubus->controller: NULL, 1165 dev = device_create(mon_bin_class, ubus ? ubus->controller : NULL,
1166 MKDEV(MAJOR(mon_bin_dev0), minor), NULL, 1166 MKDEV(MAJOR(mon_bin_dev0), minor), NULL,
1167 "usbmon%d", minor); 1167 "usbmon%d", minor);
1168 if (IS_ERR(dev)) 1168 if (IS_ERR(dev))
1169 return 0; 1169 return 0;
1170 1170