diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-16 18:17:04 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2014-05-16 18:17:04 +0000 |
commit | 5bfd92ef4012f7d92a2adea453d26cc429e33dbc (patch) | |
tree | a083dafa50f15f8743bae1acdd34cd0e8bc8f9a1 /sys/dev/pci | |
parent | ce215790cb23f45d4319b9c6fee564b6e57936c4 (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/pci')
-rw-r--r-- | sys/dev/pci/ehci_pci.c | 12 | ||||
-rw-r--r-- | sys/dev/pci/ohci_pci.c | 7 | ||||
-rw-r--r-- | sys/dev/pci/uhci_pci.c | 8 |
3 files changed, 9 insertions, 18 deletions
diff --git a/sys/dev/pci/ehci_pci.c b/sys/dev/pci/ehci_pci.c index 563477bf02a..60928caa089 100644 --- a/sys/dev/pci/ehci_pci.c +++ b/sys/dev/pci/ehci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci_pci.c,v 1.26 2013/04/15 09:23:01 mglocker Exp $ */ +/* $OpenBSD: ehci_pci.c,v 1.27 2014/05/16 18:17:03 mpi Exp $ */ /* $NetBSD: ehci_pci.c,v 1.15 2004/04/23 21:13:06 itojun Exp $ */ /* @@ -219,9 +219,7 @@ ehci_pci_attach(struct device *parent, struct device *self, void *aux) splx(s); /* Attach usb device. */ - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); - + config_found(self, &sc->sc.sc_bus, usbctlprint); return; disestablish_ret: @@ -237,10 +235,6 @@ ehci_pci_activate(struct device *self, int act) struct ehci_pci_softc *sc = (struct ehci_pci_softc *)self; int rv; - /* ehci_pci_attach previously failed in some way */ - if (sc->sc.sc_child == NULL) - return (0); - switch (act) { case DVACT_RESUME: ehci_pci_takecontroller(sc, 1); @@ -265,7 +259,7 @@ ehci_pci_detach(struct device *self, int flags) struct ehci_pci_softc *sc = (struct ehci_pci_softc *)self; int rv; - rv = ehci_detach(&sc->sc, flags); + rv = ehci_detach(self, flags); if (rv) return (rv); if (sc->sc_ih != NULL) { diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c index 4290d305208..86b6d979c09 100644 --- a/sys/dev/pci/ohci_pci.c +++ b/sys/dev/pci/ohci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_pci.c,v 1.39 2013/04/15 09:23:01 mglocker Exp $ */ +/* $OpenBSD: ohci_pci.c,v 1.40 2014/05/16 18:17:03 mpi Exp $ */ /* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */ /* @@ -194,8 +194,7 @@ ohci_pci_attach_deferred(struct device *self) splx(s); /* Attach usb device. */ - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); + config_found(self, &sc->sc.sc_bus, usbctlprint); } int @@ -204,7 +203,7 @@ ohci_pci_detach(struct device *self, int flags) struct ohci_pci_softc *sc = (struct ohci_pci_softc *)self; int rv; - rv = ohci_detach(&sc->sc, flags); + rv = ohci_detach(self, flags); if (rv) return (rv); diff --git a/sys/dev/pci/uhci_pci.c b/sys/dev/pci/uhci_pci.c index c14f0fefab9..ecf629cbfa2 100644 --- a/sys/dev/pci/uhci_pci.c +++ b/sys/dev/pci/uhci_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uhci_pci.c,v 1.32 2013/04/15 09:23:01 mglocker Exp $ */ +/* $OpenBSD: uhci_pci.c,v 1.33 2014/05/16 18:17:03 mpi Exp $ */ /* $NetBSD: uhci_pci.c,v 1.24 2002/10/02 16:51:58 thorpej Exp $ */ /* @@ -212,9 +212,7 @@ uhci_pci_attach_deferred(struct device *self) splx(s); /* Attach usb device. */ - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); - + config_found(self, &sc->sc.sc_bus, usbctlprint); return; unmap_ret: @@ -229,7 +227,7 @@ uhci_pci_detach(struct device *self, int flags) struct uhci_pci_softc *sc = (struct uhci_pci_softc *)self; int rv; - rv = uhci_detach(&sc->sc, flags); + rv = uhci_detach(self, flags); if (rv) return (rv); if (sc->sc_ih != NULL) { |