diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-05-02 06:02:41 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 15:15:47 -0700 |
commit | 0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01 (patch) | |
tree | 4b939fd3ffec09620100eeaa4e33fed373aaf2d5 /drivers/usb/core | |
parent | 7071a3ce0ca058ad2a9e3e8c33f30fb0bce62005 (diff) | |
download | linux-0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01.tar.gz linux-0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01.tar.bz2 linux-0031a06e2f07ab0d1bc98c31dbb6801f95f4bf01.zip |
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/core')
-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 |
3 files changed, 4 insertions, 5 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, 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); 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: 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); } 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, 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 */ } |