[PATCH 7/7] usb/core: make print dev like linux lsusb
Jean-Christophe PLAGNIOL-VILLARD
plagnioj at jcrosoft.com
Fri Sep 16 08:23:48 EDT 2011
and busnum start at 1
as this
Bus 001 Device 002: ID 0b95:7720 AX88772
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
drivers/usb/core/usb.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c
index 5dc8afe..24fa94a 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)
{
--
1.7.5.4
More information about the barebox
mailing list