summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/ohci.c4
-rw-r--r--sys/dev/usb/ohcivar.h2
-rw-r--r--sys/dev/usb/uhci.c4
-rw-r--r--sys/dev/usb/uhcivar.h2
-rw-r--r--sys/dev/usb/usb_port.h7
5 files changed, 8 insertions, 11 deletions
diff --git a/sys/dev/usb/ohci.c b/sys/dev/usb/ohci.c
index 5b57ead..855a118 100644
--- a/sys/dev/usb/ohci.c
+++ b/sys/dev/usb/ohci.c
@@ -360,7 +360,7 @@ ohci_detach(sc, flags)
if (rv != 0)
return (rv);
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
powerhook_disestablish(sc->sc_powerhook);
shutdownhook_disestablish(sc->sc_shutdownhook);
#endif
@@ -824,7 +824,7 @@ ohci_init(sc)
sc->sc_bus.methods = &ohci_bus_methods;
sc->sc_bus.pipe_size = sizeof(struct ohci_pipe);
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
sc->sc_powerhook = powerhook_establish(ohci_power, sc);
sc->sc_shutdownhook = shutdownhook_establish(ohci_shutdown, sc);
#endif
diff --git a/sys/dev/usb/ohcivar.h b/sys/dev/usb/ohcivar.h
index bd7000b..7860876 100644
--- a/sys/dev/usb/ohcivar.h
+++ b/sys/dev/usb/ohcivar.h
@@ -107,7 +107,7 @@ typedef struct ohci_softc {
char sc_vendor[16];
int sc_id_vendor;
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
void *sc_powerhook;
void *sc_shutdownhook; /* cookie from shutdown hook */
#endif
diff --git a/sys/dev/usb/uhci.c b/sys/dev/usb/uhci.c
index 79ce9c2..6c0b74d 100644
--- a/sys/dev/usb/uhci.c
+++ b/sys/dev/usb/uhci.c
@@ -427,7 +427,7 @@ uhci_init(sc)
sc->sc_bus.pipe_size = sizeof(struct uhci_pipe);
sc->sc_suspend = PWR_RESUME;
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
sc->sc_powerhook = powerhook_establish(uhci_power, sc);
sc->sc_shutdownhook = shutdownhook_establish(uhci_shutdown, sc);
#endif
@@ -476,7 +476,7 @@ uhci_detach(sc, flags)
if (rv != 0)
return (rv);
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
powerhook_disestablish(sc->sc_powerhook);
shutdownhook_disestablish(sc->sc_shutdownhook);
#endif
diff --git a/sys/dev/usb/uhcivar.h b/sys/dev/usb/uhcivar.h
index 4646fa5..30ba97d 100644
--- a/sys/dev/usb/uhcivar.h
+++ b/sys/dev/usb/uhcivar.h
@@ -164,7 +164,7 @@ typedef struct uhci_softc {
char sc_vendor[16]; /* vendor string for root hub */
int sc_id_vendor; /* vendor ID for root hub */
-#if defined(__NetBSD__) || defined(__OpenBSD__)
+#if defined(__NetBSD__)
void *sc_powerhook; /* cookie from power hook */
void *sc_shutdownhook; /* cookie from shutdown hook */
#endif
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index 2e86338..e6d266c 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -169,9 +169,8 @@ __CONCAT(dname,_detach)(self, flags) \
#define uhidpoll uhidselect
#define ugenpoll ugenselect
-#define powerhook_establish(fn, sc) 0
-#define powerhook_disestablish(hdl)
#define PWR_RESUME 0
+#define PWR_SUSPEND 1
typedef struct device device_ptr_t;
#define USBBASEDEVICE struct device
@@ -291,10 +290,8 @@ __CONCAT(dname,_detach)(self, flags) \
#define clalloc(p, s, x) (clist_alloc_cblocks((p), (s), (s)), 0)
#define clfree(p) clist_free_cblocks((p))
-#define powerhook_establish(fn, sc) 0
-#define powerhook_disestablish(hdl)
-#define PWR_SUSPEND 1
#define PWR_RESUME 0
+#define PWR_SUSPEND 1
#define USB_DECLARE_DRIVER_INIT(dname, init...) \
static device_probe_t __CONCAT(dname,_match); \
OpenPOWER on IntegriCloud