aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller/generic_ohci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/controller/generic_ohci.c')
-rw-r--r--sys/dev/usb/controller/generic_ohci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/controller/generic_ohci.c b/sys/dev/usb/controller/generic_ohci.c
index f3a9e0481bb2..5c0de59074d2 100644
--- a/sys/dev/usb/controller/generic_ohci.c
+++ b/sys/dev/usb/controller/generic_ohci.c
@@ -141,7 +141,7 @@ generic_ohci_attach(device_t dev)
err = ENXIO;
goto error;
}
- sc->ohci_sc.sc_bus.bdev = device_add_child(dev, "usbus", -1);
+ sc->ohci_sc.sc_bus.bdev = device_add_child(dev, "usbus", DEVICE_UNIT_ANY);
if (sc->ohci_sc.sc_bus.bdev == 0) {
err = ENXIO;
goto error;
@@ -231,7 +231,9 @@ generic_ohci_detach(device_t dev)
struct hwrst_list *rst, *rst_tmp;
/* during module unload there are lots of children leftover */
- device_delete_children(dev);
+ err = bus_generic_detach(dev);
+ if (err != 0)
+ return (err);
/*
* Put the controller into reset, then disable clocks and do