Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak...
[pandora-kernel.git] / drivers / usb / core / usb.c
index 1f0db51..84fcaa6 100644 (file)
@@ -291,6 +291,7 @@ struct usb_device *usb_alloc_dev(struct usb_device *parent,
        device_initialize(&dev->dev);
        dev->dev.bus = &usb_bus_type;
        dev->dev.type = &usb_device_type;
+       dev->dev.groups = usb_device_groups;
        dev->dev.dma_mask = bus->controller->dma_mask;
        set_dev_node(&dev->dev, dev_to_node(bus->controller));
        dev->state = USB_STATE_ATTACHED;
@@ -307,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.
         */
@@ -315,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 */
@@ -327,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 */
        }