aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/uhub.c
diff options
context:
space:
mode:
authorWarner Losh <imp@FreeBSD.org>2007-06-09 06:42:19 +0000
committerWarner Losh <imp@FreeBSD.org>2007-06-09 06:42:19 +0000
commita5b1cb0cd06670f3aa02dac1b57993f3b9c9b4ae (patch)
tree4e8b6057a86ece2adf5c83bcfaed14fd5ff4cce6 /sys/dev/usb/uhub.c
parent07f51bab6d95144cffd3f68d17154f4ee0778e71 (diff)
Notes
Diffstat (limited to 'sys/dev/usb/uhub.c')
-rw-r--r--sys/dev/usb/uhub.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 3e06d4529c659..02c252fdfea1e 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -102,6 +102,7 @@ static bus_child_pnpinfo_str_t uhub_child_pnpinfo_str;
* Every other driver only connects to hubs
*/
+/* XXX driver_added needs special care */
USB_DECLARE_DRIVER_INIT(uhub,
DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str),
DEVMETHOD(bus_child_location_str, uhub_child_location_str),
@@ -114,6 +115,7 @@ USB_DECLARE_DRIVER_INIT(uhub,
/* Create the driver instance for the hub connected to usb case. */
devclass_t uhubroot_devclass;
+/* XXX driver_added needs special care */
static device_method_t uhubroot_methods[] = {
DEVMETHOD(bus_child_location_str, uhub_child_location_str),
DEVMETHOD(bus_child_pnpinfo_str, uhub_child_pnpinfo_str),
@@ -155,7 +157,6 @@ uhub_attach(device_t self)
struct uhub_softc *sc = device_get_softc(self);
struct usb_attach_arg *uaa = device_get_ivars(self);
usbd_device_handle dev = uaa->device;
- char *devinfo;
usbd_status err;
struct usbd_hub *hub = NULL;
usb_device_request_t req;
@@ -165,15 +166,9 @@ uhub_attach(device_t self)
usb_endpoint_descriptor_t *ed;
struct usbd_tt *tts = NULL;
- devinfo = malloc(1024, M_TEMP, M_NOWAIT);
- if (devinfo == NULL)
- return (ENXIO);
DPRINTFN(1,("uhub_attach\n"));
sc->sc_hub = dev;
- usbd_devinfo(dev, 1, devinfo);
sc->sc_dev = self;
- device_set_desc_copy(self, devinfo);
- free(devinfo, M_TEMP);
if (dev->depth > 0 && UHUB_IS_HIGH_SPEED(sc)) {
device_printf(sc->sc_dev, "%s transaction translator%s\n",