aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller/generic_ehci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/controller/generic_ehci.c')
-rw-r--r--sys/dev/usb/controller/generic_ehci.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/usb/controller/generic_ehci.c b/sys/dev/usb/controller/generic_ehci.c
index 471ce72776d4..bd7dc32b1ea8 100644
--- a/sys/dev/usb/controller/generic_ehci.c
+++ b/sys/dev/usb/controller/generic_ehci.c
@@ -32,7 +32,6 @@
* Generic EHCI driver based on the Allwinner A10 EHCI driver
*/
-#include <sys/cdefs.h>
#include "opt_bus.h"
#include <sys/param.h>
@@ -100,7 +99,7 @@ generic_ehci_attach(device_t self)
device_printf(self, "Could not allocate irq\n");
goto error;
}
- sc->sc_bus.bdev = device_add_child(self, "usbus", -1);
+ sc->sc_bus.bdev = device_add_child(self, "usbus", DEVICE_UNIT_ANY);
if (!sc->sc_bus.bdev) {
device_printf(self, "Could not add USB device\n");
goto error;
@@ -139,7 +138,9 @@ generic_ehci_detach(device_t self)
int err;
/* during module unload there are lots of children leftover */
- device_delete_children(self);
+ err = bus_generic_detach(self);
+ if (err != 0)
+ return (err);
if (sc->sc_irq_res && sc->sc_intr_hdl) {
/*