diff options
| author | Ian Dowse <iedowse@FreeBSD.org> | 2005-03-25 01:44:38 +0000 |
|---|---|---|
| committer | Ian Dowse <iedowse@FreeBSD.org> | 2005-03-25 01:44:38 +0000 |
| commit | e2b66de827658154f4c4aac92aec20b2d6d05b4c (patch) | |
| tree | 8d428fb5b84d071f0ad138372a64edf6521b5c31 /sys/dev/usb/uhub.c | |
| parent | 8a9cf808e68d5c397a4946b340dd22db33c968b1 (diff) | |
Notes
Diffstat (limited to 'sys/dev/usb/uhub.c')
| -rw-r--r-- | sys/dev/usb/uhub.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c index d0a16b15ff2b..d52d7d5b7112 100644 --- a/sys/dev/usb/uhub.c +++ b/sys/dev/usb/uhub.c @@ -664,13 +664,11 @@ uhub_child_pnpinfo_str(device_t cbdev, device_t child, char *buf, struct uhub_softc *sc = device_get_softc(cbdev); usbd_device_handle devhub = sc->sc_hub; usbd_device_handle dev; - usb_string_descriptor_t us; struct usbd_interface *iface; char serial[128]; int nports; int port; - int i, j, size; - int err; + int i; nports = devhub->hub->hubdesc.bNbrPorts; for (port = 0; port < nports; port++) { @@ -688,18 +686,8 @@ uhub_child_pnpinfo_str(device_t cbdev, device_t child, char *buf, return (0); found_dev: - j = 0; - if (dev->ddesc.iSerialNumber != 0) { - err = usbd_get_string_desc(dev, dev->ddesc.iSerialNumber, 0, - &us, &size); - if (err == 0) { - do { - serial[j] = UGETW(us.bString[j]); - j++; - } while (j < ((us.bLength - 2) / 2)); - } - } - serial[j] = '\0'; + serial[0] = '\0'; + (void)usbd_get_string(dev, dev->ddesc.iSerialNumber, &serial[0]); if (dev->ifacenums == NULL) { snprintf(buf, buflen, "vendor=0x%04x product=0x%04x " "devclass=0x%02x devsubclass=0x%02x " |
