From ad21ef7776a2ecbad05f6bd6abbe5e259f5510fd Mon Sep 17 00:00:00 2001 From: mpi Date: Mon, 19 May 2014 13:11:31 +0000 Subject: [PATCH] There is no need to remember which usb(4) device is the child of an USB host controller because autoconf(9) already does it. Breakage reported by todd@ --- sys/arch/arm/xscale/pxa2x0_ohci.c | 7 +++---- sys/arch/armv7/imx/imxehci.c | 7 +++---- sys/arch/armv7/omap/omehci.c | 7 +++---- sys/arch/armv7/omap/omohci.c | 7 +++---- sys/arch/armv7/sunxi/sxiehci.c | 7 +++---- sys/arch/loongson/dev/ohci_voyager.c | 4 ++-- sys/arch/socppc/dev/ehci_obio.c | 4 ++-- 7 files changed, 19 insertions(+), 24 deletions(-) diff --git a/sys/arch/arm/xscale/pxa2x0_ohci.c b/sys/arch/arm/xscale/pxa2x0_ohci.c index 675b83710ae..fd9db77c406 100644 --- a/sys/arch/arm/xscale/pxa2x0_ohci.c +++ b/sys/arch/arm/xscale/pxa2x0_ohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pxa2x0_ohci.c,v 1.25 2013/04/16 14:55:23 deraadt Exp $ */ +/* $OpenBSD: pxa2x0_ohci.c,v 1.26 2014/05/19 13:11:31 mpi Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -126,8 +126,7 @@ unsupported: return; } - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); + config_found(self, &sc->sc.sc_bus, usbctlprint); } int @@ -136,7 +135,7 @@ pxaohci_detach(struct device *self, int flags) struct pxaohci_softc *sc = (struct pxaohci_softc *)self; int rv; - rv = ohci_detach(&sc->sc, flags); + rv = ohci_detach(self, flags); if (rv) return (rv); diff --git a/sys/arch/armv7/imx/imxehci.c b/sys/arch/armv7/imx/imxehci.c index 393e39cd09f..ef49b4fe375 100644 --- a/sys/arch/armv7/imx/imxehci.c +++ b/sys/arch/armv7/imx/imxehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imxehci.c,v 1.3 2013/11/26 20:33:11 deraadt Exp $ */ +/* $OpenBSD: imxehci.c,v 1.4 2014/05/19 13:11:31 mpi Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * @@ -205,8 +205,7 @@ imxehci_attach(struct device *parent, struct device *self, void *aux) goto intr; } - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); + config_found(self, &sc->sc.sc_bus, usbctlprint); goto out; @@ -232,7 +231,7 @@ imxehci_detach(struct device *self, int flags) struct imxehci_softc *sc = (struct imxehci_softc *)self; int rv; - rv = ehci_detach(&sc->sc, flags); + rv = ehci_detach(self, flags); if (rv) return (rv); diff --git a/sys/arch/armv7/omap/omehci.c b/sys/arch/armv7/omap/omehci.c index f258a982662..1ee3a067157 100644 --- a/sys/arch/armv7/omap/omehci.c +++ b/sys/arch/armv7/omap/omehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omehci.c,v 1.2 2013/11/06 19:03:07 syl Exp $ */ +/* $OpenBSD: omehci.c,v 1.3 2014/05/19 13:11:31 mpi Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -180,8 +180,7 @@ omehci_attach(struct device *parent, struct device *self, void *aux) goto intr; } - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); + config_found(self, &sc->sc.sc_bus, usbctlprint); goto out; @@ -426,7 +425,7 @@ omehci_detach(struct device *self, int flags) struct omehci_softc *sc = (struct omehci_softc *)self; int rv; - rv = ehci_detach(&sc->sc, flags); + rv = ehci_detach(self, flags); if (rv) return (rv); diff --git a/sys/arch/armv7/omap/omohci.c b/sys/arch/armv7/omap/omohci.c index dbad3ecba34..b4e1a8ad5ee 100644 --- a/sys/arch/armv7/omap/omohci.c +++ b/sys/arch/armv7/omap/omohci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: omohci.c,v 1.2 2013/12/11 12:51:51 naddy Exp $ */ +/* $OpenBSD: omohci.c,v 1.3 2014/05/19 13:11:31 mpi Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -223,8 +223,7 @@ omohci_attach(struct device *parent, struct device *self, void *aux) return; } - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); + config_found(self, &sc->sc.sc_bus, usbctlprint); } int @@ -233,7 +232,7 @@ omohci_detach(struct device *self, int flags) struct omohci_softc *sc = (struct omohci_softc *)self; int rv; - rv = ohci_detach(&sc->sc, flags); + rv = ohci_detach(self, flags); if (rv) return (rv); diff --git a/sys/arch/armv7/sunxi/sxiehci.c b/sys/arch/armv7/sunxi/sxiehci.c index 37e2da46d1c..05c912092cd 100644 --- a/sys/arch/armv7/sunxi/sxiehci.c +++ b/sys/arch/armv7/sunxi/sxiehci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sxiehci.c,v 1.3 2013/11/06 19:03:07 syl Exp $ */ +/* $OpenBSD: sxiehci.c,v 1.4 2014/05/19 13:11:31 mpi Exp $ */ /* * Copyright (c) 2005 David Gwynne @@ -147,8 +147,7 @@ sxiehci_attach(struct device *parent, struct device *self, void *aux) goto intr; } - sc->sc.sc_child = config_found((void *)sc, &sc->sc.sc_bus, - usbctlprint); + config_found(self, &sc->sc.sc_bus, usbctlprint); goto out; @@ -206,7 +205,7 @@ sxiehci_detach(struct device *self, int flags) struct sxiehci_softc *sc = (struct sxiehci_softc *)self; int rv; - rv = ehci_detach(&sc->sc, flags); + rv = ehci_detach(self, flags); if (rv) return (rv); diff --git a/sys/arch/loongson/dev/ohci_voyager.c b/sys/arch/loongson/dev/ohci_voyager.c index 7987a6d3ab5..574506c0b2b 100644 --- a/sys/arch/loongson/dev/ohci_voyager.c +++ b/sys/arch/loongson/dev/ohci_voyager.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ohci_voyager.c,v 1.5 2013/04/16 14:55:22 deraadt Exp $ */ +/* $OpenBSD: ohci_voyager.c,v 1.6 2014/05/19 13:11:31 mpi Exp $ */ /* OpenBSD: ohci_pci.c,v 1.33 2008/06/26 05:42:17 ray Exp */ /* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */ @@ -179,5 +179,5 @@ ohci_voyager_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); } diff --git a/sys/arch/socppc/dev/ehci_obio.c b/sys/arch/socppc/dev/ehci_obio.c index 097dc5a9cf8..85f23704393 100644 --- a/sys/arch/socppc/dev/ehci_obio.c +++ b/sys/arch/socppc/dev/ehci_obio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ehci_obio.c,v 1.3 2009/09/12 21:40:45 kettenis Exp $ */ +/* $OpenBSD: ehci_obio.c,v 1.4 2014/05/19 13:11:31 mpi Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -124,7 +124,7 @@ ehci_obio_attach(struct device *parent, struct device *self, void *aux) printf("\n"); /* Attach usb device. */ - sc->sc_child = config_found((void *)sc, &sc->sc_bus, usbctlprint); + config_found(self, &sc->sc_bus, usbctlprint); return; -- 2.20.1