]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
USB: usb dev_set_name() instead of dev->bus_id
authorKay Sievers <kay.sievers@vrfy.org>
Fri, 2 May 2008 04:02:41 +0000 (06:02 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 21 Jul 2008 22:15:47 +0000 (15:15 -0700)
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>
13 files changed:
drivers/usb/core/endpoint.c
drivers/usb/core/message.c
drivers/usb/core/usb.c
drivers/usb/gadget/amd5536udc.c
drivers/usb/gadget/dummy_hcd.c
drivers/usb/gadget/file_storage.c
drivers/usb/gadget/fsl_usb2_udc.c
drivers/usb/gadget/goku_udc.c
drivers/usb/gadget/m66592-udc.c
drivers/usb/gadget/net2280.c
drivers/usb/gadget/omap_udc.c
drivers/usb/host/isp1760-hcd.c
drivers/usb/serial/usb-serial.c

index f600aec3fb3ca26c34c48699277fb2112d5b589c..22912136fc142b780d1af23815cc29e7e3dbe0e7 100644 (file)
@@ -307,7 +307,7 @@ int usb_create_ep_files(struct device *parent,
        ep_dev->dev.class = ep_class->class;
        ep_dev->dev.parent = parent;
        ep_dev->dev.release = ep_device_release;
-       snprintf(ep_dev->dev.bus_id, BUS_ID_SIZE, "usbdev%d.%d_ep%02x",
+       dev_set_name(&ep_dev->dev, "usbdev%d.%d_ep%02x",
                 udev->bus->busnum, udev->devnum,
                 endpoint->desc.bEndpointAddress);
 
index 1141a4918e882fd2d3fcbcaa7681ea292c95089c..315363b744a3781ab86e5e3476e35061e89cd30c 100644 (file)
@@ -1611,7 +1611,7 @@ free_interfaces:
                intf->dev.dma_mask = dev->dev.dma_mask;
                device_initialize(&intf->dev);
                mark_quiesced(intf);
-               sprintf(&intf->dev.bus_id[0], "%d-%s:%d.%d",
+               dev_set_name(&intf->dev, "%d-%s:%d.%d",
                        dev->bus->busnum, dev->devpath,
                        configuration, alt->desc.bInterfaceNumber);
        }
index 3aca6d5afcdfc58124f0fc569d518217fc1ff729..84fcaa6a21ec285e85ab309bfc0b4be728f62caa 100644 (file)
@@ -316,7 +316,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
                dev->devpath[0] = '0';
 
                dev->dev.parent = bus->controller;
-               sprintf(&dev->dev.bus_id[0], "usb%d", bus->busnum);
+               dev_set_name(&dev->dev, "usb%d", bus->busnum);
                root_hub = 1;
        } else {
                /* match any labeling on the hubs; it's one-based */
@@ -328,8 +328,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
                                "%s.%d", parent->devpath, port1);
 
                dev->dev.parent = &parent->dev;
-               sprintf(&dev->dev.bus_id[0], "%d-%s",
-                       bus->busnum, dev->devpath);
+               dev_set_name(&dev->dev, "%d-%s", bus->busnum, dev->devpath);
 
                /* hub driver sets up TT records */
        }
index f261d2a9a5f00bafd2e02f6cb4b119378773c04a..1500e1b3c30289af26bdc9400c59845129aaa9d1 100644 (file)
@@ -3342,7 +3342,7 @@ static int udc_probe(struct udc *dev)
        spin_lock_init(&dev->lock);
        dev->gadget.ops = &udc_ops;
 
-       strcpy(dev->gadget.dev.bus_id, "gadget");
+       dev_set_name(&dev->gadget.dev, "gadget");
        dev->gadget.dev.release = gadget_release;
        dev->gadget.name = name;
        dev->gadget.name = name;
index b36ad240534ce82e36334fe1cf3a07b83bccb736..21d1406af9ee04f8e07d3afe0b073fd6df02bdaf 100644 (file)
@@ -862,7 +862,7 @@ static int dummy_udc_probe (struct platform_device *pdev)
        /* maybe claim OTG support, though we won't complete HNP */
        dum->gadget.is_otg = (dummy_to_hcd(dum)->self.otg_port != 0);
 
-       strcpy (dum->gadget.dev.bus_id, "gadget");
+       dev_set_name(&dum->gadget.dev, "gadget");
        dum->gadget.dev.parent = &pdev->dev;
        dum->gadget.dev.release = dummy_gadget_release;
        rc = device_register (&dum->gadget.dev);
index 638cee03a24e888806cf0d5f09edbd27b698e9a5..15c24edbb61adb29a40db7a5e7c83dc63a4a777f 100644 (file)
@@ -3867,8 +3867,8 @@ static int __init fsg_bind(struct usb_gadget *gadget)
                curlun->dev.parent = &gadget->dev;
                curlun->dev.driver = &fsg_driver.driver;
                dev_set_drvdata(&curlun->dev, fsg);
-               snprintf(curlun->dev.bus_id, BUS_ID_SIZE,
-                               "%s-lun%d", dev_name(&gadget->dev), i);
+               dev_set_name(&curlun->dev,"%s-lun%d",
+                            dev_name(&gadget->dev), i);
 
                if ((rc = device_register(&curlun->dev)) != 0) {
                        INFO(fsg, "failed to register LUN%d: %d\n", i, rc);
index 18687543d7fa0ba3382f8da11f344fc713565923..1695382f30fe5ce3a4898f067b12b8a632429f96 100644 (file)
@@ -2331,7 +2331,7 @@ static int __init fsl_udc_probe(struct platform_device *pdev)
        udc_controller->gadget.name = driver_name;
 
        /* Setup gadget.dev and register with kernel */
-       strcpy(udc_controller->gadget.dev.bus_id, "gadget");
+       dev_set_name(&udc_controller->gadget.dev, "gadget");
        udc_controller->gadget.dev.release = fsl_udc_release;
        udc_controller->gadget.dev.parent = &pdev->dev;
        ret = device_register(&udc_controller->gadget.dev);
index be6613afedbfd317f907a4d252973b4b9c73b787..48f1c63b70136ec17d458091e4ae7cba8528aaf5 100644 (file)
@@ -1790,7 +1790,7 @@ static int goku_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        dev->gadget.ops = &goku_ops;
 
        /* the "gadget" abstracts/virtualizes the controller */
-       strcpy(dev->gadget.dev.bus_id, "gadget");
+       dev_set_name(&dev->gadget.dev, "gadget");
        dev->gadget.dev.parent = &pdev->dev;
        dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
        dev->gadget.dev.release = gadget_release;
index ee6b35fa870f9ef6ff9807b2abf33a7400da4861..8da7535c0c70c96b2988ac164e9655630472b362 100644 (file)
@@ -1593,7 +1593,7 @@ static int __init m66592_probe(struct platform_device *pdev)
 
        m66592->gadget.ops = &m66592_gadget_ops;
        device_initialize(&m66592->gadget.dev);
-       strcpy(m66592->gadget.dev.bus_id, "gadget");
+       dev_set_name(&m66592->gadget, "gadget");
        m66592->gadget.is_dualspeed = 1;
        m66592->gadget.dev.parent = &pdev->dev;
        m66592->gadget.dev.dma_mask = pdev->dev.dma_mask;
index e01862300169772d714a6ab24a4db9938825fd9d..b67ab677af725dd2d5d685ed3f982651f085d5a6 100644 (file)
@@ -2768,7 +2768,7 @@ static int net2280_probe (struct pci_dev *pdev, const struct pci_device_id *id)
        dev->gadget.is_dualspeed = 1;
 
        /* the "gadget" abstracts/virtualizes the controller */
-       strcpy (dev->gadget.dev.bus_id, "gadget");
+       dev_set_name(&dev->gadget.dev, "gadget");
        dev->gadget.dev.parent = &pdev->dev;
        dev->gadget.dev.dma_mask = pdev->dev.dma_mask;
        dev->gadget.dev.release = gadget_release;
index 03a7f49d207d5767c7ee129a12847e526e7eac48..4b79a8509e848e8ebb3d6d656d684d3d3af080f9 100644 (file)
@@ -2686,7 +2686,7 @@ omap_udc_setup(struct platform_device *odev, struct otg_transceiver *xceiv)
        udc->gadget.name = driver_name;
 
        device_initialize(&udc->gadget.dev);
-       strcpy (udc->gadget.dev.bus_id, "gadget");
+       dev_set_name(&udc->gadget.dev, "gadget");
        udc->gadget.dev.release = omap_udc_release;
        udc->gadget.dev.parent = &odev->dev;
        if (use_dma)
index 65aa5ecf569aca520473c59e4f86e5e5b7f63fb6..0873168cded2bf9630ca12c2afbec1fb9a7b3634 100644 (file)
@@ -2195,7 +2195,7 @@ struct usb_hcd *isp1760_register(u64 res_start, u64 res_len, int irq,
        /* prevent usb-core allocating DMA pages */
        dev->dma_mask = NULL;
 
-       hcd = usb_create_hcd(&isp1760_hc_driver, dev, dev->bus_id);
+       hcd = usb_create_hcd(&isp1760_hc_driver, dev, dev_name(dev));
        if (!hcd)
                return ERR_PTR(-ENOMEM);
 
index b4620c009d18c33323dcca47ecf1d06d13a2db7c..717e376795e4c7f7f2ed258f770ecd512bab7fba 100644 (file)
@@ -938,7 +938,7 @@ int usb_serial_probe(struct usb_interface *interface,
                port->dev.bus = &usb_serial_bus_type;
                port->dev.release = &port_release;
 
-               snprintf (&port->dev.bus_id[0], sizeof(port->dev.bus_id), "ttyUSB%d", port->number);
+               dev_set_name(&port->dev, "ttyUSB%d", port->number);
                dbg ("%s - registering %s", __func__, dev_name(&port->dev));
                retval = device_register(&port->dev);
                if (retval)