summaryrefslogtreecommitdiff
path: root/sys/dev/pci/ohci_pci.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2005-03-30 14:02:04 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2005-03-30 14:02:04 +0000
commitc593492063adad7596bea476f7ca7656c6ec3f33 (patch)
tree91e61e1ee77ea5fa73bdb3a349e000cbf29033fa /sys/dev/pci/ohci_pci.c
parent0b6d27832ef6d0e331b4660db5272c34ae508242 (diff)
make the powerhooks the responsibility of the bus ohci is attached to
ok uwe@
Diffstat (limited to 'sys/dev/pci/ohci_pci.c')
-rw-r--r--sys/dev/pci/ohci_pci.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index 0364bdab81a..804c65225f4 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.22 2004/12/31 04:22:32 dlg Exp $ */
+/* $OpenBSD: ohci_pci.c,v 1.23 2005/03/30 14:02:03 dlg Exp $ */
/* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */
/*
@@ -178,6 +178,9 @@ ohci_pci_attach(struct device *parent, struct device *self, void *aux)
splx(s);
return;
}
+
+ sc->sc.sc_powerhook = powerhook_establish(ohci_power, &sc->sc);
+
splx(s);
usb_pci_add(&sc->sc_pci, pa, &sc->sc.sc_bus);
@@ -196,6 +199,9 @@ ohci_pci_detach(device_ptr_t self, int flags)
rv = ohci_detach(&sc->sc, flags);
if (rv)
return (rv);
+
+ powerhook_disestablish(sc->sc.sc_powerhook);
+
if (sc->sc_ih != NULL) {
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
sc->sc_ih = NULL;