]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/core/usb.c
USB: usb dev_set_name() instead of dev->bus_id
[linux-2.6-omap-h63xx.git] / drivers / usb / core / usb.c
index 325774375837e5f1c578c7c402fd7bffaf18960a..84fcaa6a21ec285e85ab309bfc0b4be728f62caa 100644 (file)
@@ -308,7 +308,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
         * by location for diagnostics, tools, driver model, etc.  The
         * string is a path along hub ports, from the root.  Each device's
         * dev->devpath will be stable until USB is re-cabled, and hubs
-        * are often labeled with these port numbers.  The bus_id isn't
+        * are often labeled with these port numbers.  The name isn't
         * as stable:  bus->busnum changes easily from modprobe order,
         * cardbus or pci hotplugging, and so on.
         */
@@ -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 */
        }