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/core | |
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/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, | |||
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 | } |