aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/controller/uhci_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/usb/controller/uhci_pci.c')
-rw-r--r--sys/dev/usb/controller/uhci_pci.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/usb/controller/uhci_pci.c b/sys/dev/usb/controller/uhci_pci.c
index 250e2a7b31c6..97f6d09f9e65 100644
--- a/sys/dev/usb/controller/uhci_pci.c
+++ b/sys/dev/usb/controller/uhci_pci.c
@@ -30,7 +30,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <sys/cdefs.h>
/* Universal Host Controller Interface
*
* UHCI spec: http://www.intel.com/
@@ -323,7 +322,7 @@ uhci_pci_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;
@@ -414,9 +413,12 @@ int
uhci_pci_detach(device_t self)
{
uhci_softc_t *sc = device_get_softc(self);
+ int error;
/* during module unload there are lots of children leftover */
- device_delete_children(self);
+ error = bus_generic_detach(self);
+ if (error != 0)
+ return (error);
/*
* disable interrupts that might have been switched on in