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/usb.c | |
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/usb.c')
-rw-r--r-- | drivers/usb/core/usb.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 3aca6d5afcd..84fcaa6a21e 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 | } |