summaryrefslogtreecommitdiff
path: root/sys/dev/usb/ehci.c
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2014-05-16 18:17:04 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2014-05-16 18:17:04 +0000
commit5bfd92ef4012f7d92a2adea453d26cc429e33dbc (patch)
treea083dafa50f15f8743bae1acdd34cd0e8bc8f9a1 /sys/dev/usb/ehci.c
parentce215790cb23f45d4319b9c6fee564b6e57936c4 (diff)
There is no need to remember which usb(4) device is the child of an USB
host controller because autoconf(9) already does it.
Diffstat (limited to 'sys/dev/usb/ehci.c')
-rw-r--r--sys/dev/usb/ehci.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/dev/usb/ehci.c b/sys/dev/usb/ehci.c
index d9f83687d29..423c408144c 100644
--- a/sys/dev/usb/ehci.c
+++ b/sys/dev/usb/ehci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ehci.c,v 1.153 2014/05/09 11:01:06 mpi Exp $ */
+/* $OpenBSD: ehci.c,v 1.154 2014/05/16 18:17:03 mpi Exp $ */
/* $NetBSD: ehci.c,v 1.66 2004/06/30 03:11:56 mycroft Exp $ */
/*
@@ -1006,13 +1006,12 @@ ehci_poll(struct usbd_bus *bus)
}
int
-ehci_detach(struct ehci_softc *sc, int flags)
+ehci_detach(struct device *self, int flags)
{
- int rv = 0;
-
- if (sc->sc_child != NULL)
- rv = config_detach(sc->sc_child, flags);
+ struct ehci_softc *sc = (struct ehci_softc *)self;
+ int rv;
+ rv = config_detach_children(self, flags);
if (rv != 0)
return (rv);
@@ -1138,8 +1137,7 @@ ehci_activate(struct device *self, int act)
rv = config_activate_children(self, act);
break;
case DVACT_DEACTIVATE:
- if (sc->sc_child != NULL)
- rv = config_deactivate(sc->sc_child);
+ rv = config_activate_children(self, act);
sc->sc_bus.dying = 1;
break;
case DVACT_POWERDOWN: