summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>2000-03-15 22:12:47 +0000
committern_hibma <n_hibma@FreeBSD.org>2000-03-15 22:12:47 +0000
commit2255c5b248866c67307275d5d279bcf3fceb54bb (patch)
treebc989b4ba5e904135ea240c4f4c99534a3b67e40 /sys
parentda12839ce8b5a02ebb1a1050d8ac5d9c2255808b (diff)
downloadFreeBSD-src-2255c5b248866c67307275d5d279bcf3fceb54bb.zip
FreeBSD-src-2255c5b248866c67307275d5d279bcf3fceb54bb.tar.gz
Do not use the powerhooks at all, instead of abusing and empty #define.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/uhci.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 4cd3a3d..79ce9c2 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -95,7 +95,7 @@ struct cfdriver uhci_cd = {
#ifdef UHCI_DEBUG
#define DPRINTF(x) if (uhcidebug) printf x
#define DPRINTFN(n,x) if (uhcidebug>(n)) printf x
-int uhcidebug = 0;
+int uhcidebug = 1;
#else
#define DPRINTF(x)
#define DPRINTFN(n,x)
@@ -427,8 +427,8 @@ uhci_init(sc)
sc->sc_bus.pipe_size = sizeof(struct uhci_pipe);
sc->sc_suspend = PWR_RESUME;
- sc->sc_powerhook = powerhook_establish(uhci_power, sc);
#if defined(__NetBSD__) || defined(__OpenBSD__)
+ sc->sc_powerhook = powerhook_establish(uhci_power, sc);
sc->sc_shutdownhook = shutdownhook_establish(uhci_shutdown, sc);
#endif
DPRINTFN(1,("uhci_init: enabling\n"));
@@ -476,8 +476,10 @@ uhci_detach(sc, flags)
if (rv != 0)
return (rv);
+#if defined(__NetBSD__) || defined(__OpenBSD__)
powerhook_disestablish(sc->sc_powerhook);
shutdownhook_disestablish(sc->sc_shutdownhook);
+#endif
/* Free all xfers associated with this HC. */
for (;;) {
OpenPOWER on IntegriCloud