summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-09-19 14:15:44 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-09-20 21:12:46 +0200
commit8026b62dc4f8e0840ec175a60981d3b05345e8ef (patch)
tree6401f6fb7377198793c6f914cc7241de852fb482 /drivers
parentafdfa915ce152341474f21d1260d0a7c96bc9b2f (diff)
downloadbarebox-8026b62dc4f8e0840ec175a60981d3b05345e8ef.tar.gz
barebox-8026b62dc4f8e0840ec175a60981d3b05345e8ef.tar.xz
usb/core: make print dev like linux lsusb
and busnum start at 1 as this Bus 001 Device 002: ID 0b95:7720 AX88772 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/core/usb.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index b01a79745e..f2c57103d6 100644
--- a/drivers/usb/core/usb.c
+++ b/drivers/usb/core/usb.c
@@ -78,13 +78,14 @@ static LIST_HEAD(usb_device_list);
static void print_usb_device(struct usb_device *dev)
{
- printf("%s: %04x:%04x %s\n", dev->dev.name,
- dev->descriptor.idVendor,
- dev->descriptor.idProduct,
- dev->prod);
+ printf("Bus %03d Device %03d: ID %04x:%04x %s\n",
+ dev->host->busnum, dev->devnum,
+ dev->descriptor.idVendor,
+ dev->descriptor.idProduct,
+ dev->prod);
}
-static int host_busnum;
+static int host_busnum = 1;
int usb_register_host(struct usb_host *host)
{