diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-05-02 00:02:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 18:15:47 -0400 |
commit | 0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01 (patch) | |
tree | 4b939fd3ffec09620100eeaa4e33fed373aaf2d5 /drivers/usb | |
parent | 7071a3ce0ca058ad2a9e3e8c33f30fb0bce62005 (diff) |
USB: usb dev_set_name() instead of dev->bus_id
The bus_id field is going away, use the dev_set_name() function
to set it properly.
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/core/endpoint.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/message.c | 2 | ||||
-rw-r--r-- | drivers/usb/core/usb.c | 5 | ||||
-rw-r--r-- | drivers/usb/gadget/amd5536udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/dummy_hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/file_storage.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/fsl_usb2_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/goku_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/m66592-udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/net2280.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/isp1760-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 2 |
13 files changed, 15 insertions, 16 deletions
diff --git a/drivers/usb/core/endpoint.c b/drivers/usb/core/endpoint.c index f600aec3fb3c..22912136fc14 100644 --- a/drivers/usb/core/endpoint.c +++ b/drivers/usb/core/endpoint.c | |||
@@ -307,7 +307,7 @@ int usb_create_ep_files(struct device *parent, | |||
307 | ep_dev->dev.class = ep_class->class; | 307 | ep_dev->dev.class = ep_class->class; |
308 | ep_dev->dev.parent = parent; | 308 | ep_dev->dev.parent = parent; |
309 | ep_dev->dev.release = ep_device_release; | 309 | ep_dev->dev.release = ep_device_release; |
310 | snprintf(ep_dev->dev.bus_id, BUS_ID_SIZE, "usbdev%d.%d_ep%02x", | 310 | dev_set_name(&ep_dev->dev, "usbdev%d.%d_ep%02x", |
311 | udev->bus->busnum, udev->devnum, | 311 | udev->bus->busnum, udev->devnum, |
312 | endpoint->desc.bEndpointAddress); | 312 | endpoint->desc.bEndpointAddress); |
313 | 313 | ||
diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 1141a4918e88..315363b744a3 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c | |||
@@ -1611,7 +1611,7 @@ free_interfaces: | |||
1611 | intf->dev.dma_mask = dev->dev.dma_mask; | 1611 | intf->dev.dma_mask = dev->dev.dma_mask; |
1612 | device_initialize(&intf->dev); | 1612 | device_initialize(&intf->dev); |
1613 | mark_quiesced(intf); | 1613 | mark_quiesced(intf); |
1614 | sprintf(&intf->dev.bus_id[0], "%d-%s:%d.%d", | 1614 | dev_set_name(&intf->dev, "%d-%s:%d.%d", |
1615 | dev->bus->busnum, dev->devpath, | 1615 | dev->bus->busnum, dev->devpath, |
1616 | configuration, alt->desc.bInterfaceNumber); | 1616 | configuration, alt->desc.bInterfaceNumber); |
1617 | } | 1617 | } |
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 3aca6d5afcdf..84fcaa6a21ec 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c | |||
@@ -316,7 +316,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, | |||
316 | dev->devpath[0] = '0'; | 316 | dev->devpath[0] = '0'; |
317 | 317 | ||
318 | dev->dev.parent = bus->controller; | 318 | dev->dev.parent = bus->controller; |
319 | sprintf(&dev->dev.bus_id[0], "usb%d", bus->busnum); | 319 | dev_set_name(&dev->dev, "usb%d", bus->busnum); |
320 | root_hub = 1; | 320 | root_hub = 1; |
321 | } else { | 321 | } else { |
322 | /* match any labeling on the hubs; it's one-based */ | 322 | /* match any labeling on the hubs; it's one-based */ |
@@ -328,8 +328,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent, | |||
328 | "%s.%d", parent->devpath, port1); | 328 | "%s.%d", parent->devpath, port1); |
329 | 329 | ||
330 | dev->dev.parent = &parent->dev; | 330 | dev->dev.parent = &parent->dev; |
331 | sprintf(&dev->dev.bus_id[0], "%d-%s", | 331 | dev_set_name(&dev->dev, "%d-%s", bus->busnum, dev->devpath); |
332 | bus->busnum, dev->devpath); | ||
333 | 332 | ||
334 | /* hub driver sets up TT records */ | 333 | /* hub driver sets up TT records */ |
335 | } | 334 | } |
diff --git a/drivers/usb/gadget/amd5536udc.c b/drivers/usb/gadget/amd5536udc.c index f261d2a9a5f0..1500e1b3c302 100644 --- a/drivers/usb/gadget/amd5536udc.c +++ b/drivers/usb/gadget/amd5536udc.c | |||
@@ -3342,7 +3342,7 @@ static int udc_probe(struct udc *dev) | |||
3342 | spin_lock_init(&dev->lock); | 3342 | spin_lock_init(&dev->lock); |
3343 | dev->gadget.ops = &udc_ops; | 3343 | dev->gadget.ops = &udc_ops; |
3344 | 3344 | ||
3345 | strcpy(dev->gadget.dev.bus_id, "gadget"); | 3345 | dev_set_name(&dev->gadget.dev, "gadget"); |
3346 | dev->gadget.dev.release = gadget_release; | 3346 | dev->gadget.dev.release = gadget_release; |
3347 | dev->gadget.name = name; | 3347 | dev->gadget.name = name; |
3348 | dev->gadget.name = name; | 3348 | dev->gadget.name = name; |
diff --git a/drivers/usb/gadget/dummy_hcd.c b/drivers/usb/gadget/dummy_hcd.c index b36ad240534c..21d1406af9ee 100644 --- a/drivers/usb/gadget/dummy_hcd.c +++ b/drivers/usb/gadget/dummy_hcd.c | |||
@@ -862,7 +862,7 @@ static int dummy_udc_probe (struct platform_device *pdev) | |||
862 | /* maybe claim OTG support, though we won't complete HNP */ | 862 | /* maybe claim OTG support, though we won't complete HNP */ |
863 | dum->gadget.is_otg = (dummy_to_hcd(dum)->self.otg_port != 0); | 863 | dum->gadget.is_otg = (dummy_to_hcd(dum)->self.otg_port != 0); |
864 | 864 | ||
865 | strcpy (dum->gadget.dev.bus_id, "gadget"); | 865 | dev_set_name(&dum->gadget.dev, "gadget"); |
866 | dum->gadget.dev.parent = &pdev->dev; | 866 | dum->gadget.dev.parent = &pdev->dev; |
867 | dum->gadget.dev.release = dummy_gadget_release; | 867 | dum->gadget.dev.release = dummy_gadget_release; |
868 | rc = device_register (&dum->gadget.dev); | 868 | rc = device_register (&dum->gadget.dev); |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 638cee03a24e..15c24edbb61a 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
@@ -3867,8 +3867,8 @@ static int __init fsg_bind(struct usb_gadget *gadget) | |||
3867 | curlun->dev.parent = &gadget->dev; | 3867 | curlun->dev.parent = &gadget->dev; |
3868 | curlun->dev.driver = &fsg_driver.driver; | 3868 | curlun->dev.driver = &fsg_driver.driver; |
3869 | dev_set_drvdata(&curlun->dev, fsg); | 3869 | dev_set_drvdata(&curlun->dev, fsg); |
3870 | snprintf(curlun->dev.bus_id, BUS_ID_SIZE, | 3870 | dev_set_name(&curlun->dev,"%s-lun%d", |
3871 | "%s-lun%d", dev_name(&gadget->dev), i); | 3871 | dev_name(&gadget->dev), i); |
3872 | 3872 | ||
3873 | if ((rc = device_register(&curlun->dev)) != 0) { | 3873 | if ((rc = device_register(&curlun->dev)) != 0) { |
3874 | INFO(fsg, "failed to register LUN%d: %d\n", i, rc); | 3874 | INFO(fsg, "failed to register LUN%d: %d\n", i, rc); |
diff --git a/drivers/usb/gadget/fsl_usb2_udc.c b/drivers/usb/gadget/fsl_usb2_udc.c index 18687543d7fa..1695382f30fe 100644 --- a/drivers/usb/gadget/fsl_usb2_udc.c +++ b/drivers/usb/gadget/fsl_usb2_udc.c | |||
@@ -2331,7 +2331,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev) | |||
2331 | udc_controller->gadget.name = driver_name; | 2331 | udc_controller->gadget.name = driver_name; |
2332 | 2332 | ||
2333 | /* Setup gadget.dev and register with kernel */ | 2333 | /* Setup gadget.dev and register with kernel */ |
2334 | strcpy(udc_controller->gadget.dev.bus_id, "gadget"); | 2334 | dev_set_name(&udc_controller->gadget.dev, "gadget"); |
2335 | udc_controller->gadget.dev.release = fsl_udc_release; | 2335 | udc_controller->gadget.dev.release = fsl_udc_release; |
2336 | udc_controller->gadget.dev.parent = &pdev->dev; | 2336 | udc_controller->gadget.dev.parent = &pdev->dev; |
2337 | ret = device_register(&udc_controller->gadget.dev); | 2337 | ret = device_register(&udc_controller->gadget.dev); |
diff --git a/drivers/usb/gadget/goku_udc.c b/drivers/usb/gadget/goku_udc.c index be6613afedbf..48f1c63b7013 100644 --- a/drivers/usb/gadget/goku_udc.c +++ b/drivers/usb/gadget/goku_udc.c | |||
@@ -1790,7 +1790,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1790 | dev->gadget.ops = &goku_ops; | 1790 | dev->gadget.ops = &goku_ops; |
1791 | 1791 | ||
1792 | /* the "gadget" abstracts/virtualizes the controller */ | 1792 | /* the "gadget" abstracts/virtualizes the controller */ |
1793 | strcpy(dev->gadget.dev.bus_id, "gadget"); | 1793 | dev_set_name(&dev->gadget.dev, "gadget"); |
1794 | dev->gadget.dev.parent = &pdev->dev; | 1794 | dev->gadget.dev.parent = &pdev->dev; |
1795 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1795 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; |
1796 | dev->gadget.dev.release = gadget_release; | 1796 | dev->gadget.dev.release = gadget_release; |
diff --git a/drivers/usb/gadget/m66592-udc.c b/drivers/usb/gadget/m66592-udc.c index ee6b35fa870f..8da7535c0c70 100644 --- a/drivers/usb/gadget/m66592-udc.c +++ b/drivers/usb/gadget/m66592-udc.c | |||
@@ -1593,7 +1593,7 @@ static int __init m66592_probe(struct platform_device *pdev) | |||
1593 | 1593 | ||
1594 | m66592->gadget.ops = &m66592_gadget_ops; | 1594 | m66592->gadget.ops = &m66592_gadget_ops; |
1595 | device_initialize(&m66592->gadget.dev); | 1595 | device_initialize(&m66592->gadget.dev); |
1596 | strcpy(m66592->gadget.dev.bus_id, "gadget"); | 1596 | dev_set_name(&m66592->gadget, "gadget"); |
1597 | m66592->gadget.is_dualspeed = 1; | 1597 | m66592->gadget.is_dualspeed = 1; |
1598 | m66592->gadget.dev.parent = &pdev->dev; | 1598 | m66592->gadget.dev.parent = &pdev->dev; |
1599 | m66592->gadget.dev.dma_mask = pdev->dev.dma_mask; | 1599 | m66592->gadget.dev.dma_mask = pdev->dev.dma_mask; |
diff --git a/drivers/usb/gadget/net2280.c b/drivers/usb/gadget/net2280.c index e01862300169..b67ab677af72 100644 --- a/drivers/usb/gadget/net2280.c +++ b/drivers/usb/gadget/net2280.c | |||
@@ -2768,7 +2768,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id) | |||
2768 | dev->gadget.is_dualspeed = 1; | 2768 | dev->gadget.is_dualspeed = 1; |
2769 | 2769 | ||
2770 | /* the "gadget" abstracts/virtualizes the controller */ | 2770 | /* the "gadget" abstracts/virtualizes the controller */ |
2771 | strcpy (dev->gadget.dev.bus_id, "gadget"); | 2771 | dev_set_name(&dev->gadget.dev, "gadget"); |
2772 | dev->gadget.dev.parent = &pdev->dev; | 2772 | dev->gadget.dev.parent = &pdev->dev; |
2773 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; | 2773 | dev->gadget.dev.dma_mask = pdev->dev.dma_mask; |
2774 | dev->gadget.dev.release = gadget_release; | 2774 | dev->gadget.dev.release = gadget_release; |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index 03a7f49d207d..4b79a8509e84 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -2686,7 +2686,7 @@ omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv) | |||
2686 | udc->gadget.name = driver_name; | 2686 | udc->gadget.name = driver_name; |
2687 | 2687 | ||
2688 | device_initialize(&udc->gadget.dev); | 2688 | device_initialize(&udc->gadget.dev); |
2689 | strcpy (udc->gadget.dev.bus_id, "gadget"); | 2689 | dev_set_name(&udc->gadget.dev, "gadget"); |
2690 | udc->gadget.dev.release = omap_udc_release; | 2690 | udc->gadget.dev.release = omap_udc_release; |
2691 | udc->gadget.dev.parent = &odev->dev; | 2691 | udc->gadget.dev.parent = &odev->dev; |
2692 | if (use_dma) | 2692 | if (use_dma) |
diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c index 65aa5ecf569a..0873168cded2 100644 --- a/drivers/usb/host/isp1760-hcd.c +++ b/drivers/usb/host/isp1760-hcd.c | |||
@@ -2195,7 +2195,7 @@ struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq, | |||
2195 | /* prevent usb-core allocating DMA pages */ | 2195 | /* prevent usb-core allocating DMA pages */ |
2196 | dev->dma_mask = NULL; | 2196 | dev->dma_mask = NULL; |
2197 | 2197 | ||
2198 | hcd = usb_create_hcd(&isp1760_hc_driver, dev, dev->bus_id); | 2198 | hcd = usb_create_hcd(&isp1760_hc_driver, dev, dev_name(dev)); |
2199 | if (!hcd) | 2199 | if (!hcd) |
2200 | return ERR_PTR(-ENOMEM); | 2200 | return ERR_PTR(-ENOMEM); |
2201 | 2201 | ||
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index b4620c009d18..717e376795e4 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -938,7 +938,7 @@ int usb_serial_probe(struct usb_interface *interface, | |||
938 | port->dev.bus = &usb_serial_bus_type; | 938 | port->dev.bus = &usb_serial_bus_type; |
939 | port->dev.release = &port_release; | 939 | port->dev.release = &port_release; |
940 | 940 | ||
941 | snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number); | 941 | dev_set_name(&port->dev, "ttyUSB%d", port->number); |
942 | dbg ("%s - registering %s", __func__, dev_name(&port->dev)); | 942 | dbg ("%s - registering %s", __func__, dev_name(&port->dev)); |
943 | retval = device_register(&port->dev); | 943 | retval = device_register(&port->dev); |
944 | if (retval) | 944 | if (retval) |