summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-07 16:21:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2010-09-07 16:21:48 +0000
commit0909b33ee356b8b24e8cfd8ef9abfcce75eac449 (patch)
tree60b4dbc9eaed4dfda443b0bf3fa9ec06a75b03ad /sys/dev/pci
parent06c96fb315950bff13bd7a73d355ebdc21e85191 (diff)
remove the powerhook code. All architectures now use the ca_activate tree
traversal code to suspend/resume ok oga kettenis blambert
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/arc.c4
-rw-r--r--sys/dev/pci/auacer.c14
-rw-r--r--sys/dev/pci/auglx.c14
-rw-r--r--sys/dev/pci/auich.c13
-rw-r--r--sys/dev/pci/autri.c11
-rw-r--r--sys/dev/pci/cs4280.c12
-rw-r--r--sys/dev/pci/cs4281.c13
-rw-r--r--sys/dev/pci/esa.c16
-rw-r--r--sys/dev/pci/esavar.h3
-rw-r--r--sys/dev/pci/eso.c14
-rw-r--r--sys/dev/pci/esovar.h3
-rw-r--r--sys/dev/pci/i82365_pci.c3
-rw-r--r--sys/dev/pci/if_bge.c10
-rw-r--r--sys/dev/pci/if_bgereg.h3
-rw-r--r--sys/dev/pci/if_bnxreg.h3
-rw-r--r--sys/dev/pci/if_em.c16
-rw-r--r--sys/dev/pci/if_em.h3
-rw-r--r--sys/dev/pci/if_ipw.c11
-rw-r--r--sys/dev/pci/if_ipwvar.h3
-rw-r--r--sys/dev/pci/if_iwi.c11
-rw-r--r--sys/dev/pci/if_iwivar.h3
-rw-r--r--sys/dev/pci/if_iwn.c15
-rw-r--r--sys/dev/pci/if_iwnvar.h3
-rw-r--r--sys/dev/pci/if_nfe.c11
-rw-r--r--sys/dev/pci/if_nfevar.h3
-rw-r--r--sys/dev/pci/if_re_pci.c6
-rw-r--r--sys/dev/pci/if_wi_pci.c13
-rw-r--r--sys/dev/pci/if_wpi.c15
-rw-r--r--sys/dev/pci/if_wpivar.h3
-rw-r--r--sys/dev/pci/maestro.c14
-rw-r--r--sys/dev/pci/neo.c14
-rw-r--r--sys/dev/pci/ohci_pci.c11
-rw-r--r--sys/dev/pci/pccbb.c11
-rw-r--r--sys/dev/pci/pci.c18
-rw-r--r--sys/dev/pci/pcivar.h3
-rw-r--r--sys/dev/pci/sdhc_pci.c5
-rw-r--r--sys/dev/pci/yds.c11
-rw-r--r--sys/dev/pci/ydsreg.h3
38 files changed, 40 insertions, 302 deletions
diff --git a/sys/dev/pci/arc.c b/sys/dev/pci/arc.c
index 142ce082c06..55562453d4a 100644
--- a/sys/dev/pci/arc.c
+++ b/sys/dev/pci/arc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: arc.c,v 1.91 2010/08/07 03:50:02 krw Exp $ */
+/* $OpenBSD: arc.c,v 1.92 2010/09/07 16:21:44 deraadt Exp $ */
/*
* Copyright (c) 2006 David Gwynne <dlg@openbsd.org>
@@ -592,7 +592,7 @@ arc_attach(struct device *parent, struct device *self, void *aux)
sc->sc_shutdownhook = shutdownhook_establish(arc_shutdown, sc);
if (sc->sc_shutdownhook == NULL)
- panic("unable to establish arc powerhook");
+ panic("unable to establish arc shutdownhook");
sc->sc_link.adapter = &arc_switch;
sc->sc_link.adapter_softc = sc;
diff --git a/sys/dev/pci/auacer.c b/sys/dev/pci/auacer.c
index ceaebca7cbc..d45d8008fd5 100644
--- a/sys/dev/pci/auacer.c
+++ b/sys/dev/pci/auacer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auacer.c,v 1.8 2010/08/27 18:50:56 deraadt Exp $ */
+/* $OpenBSD: auacer.c,v 1.9 2010/09/07 16:21:44 deraadt Exp $ */
/* $NetBSD: auacer.c,v 1.3 2004/11/10 04:20:26 kent Exp $ */
/*-
@@ -118,9 +118,6 @@ struct auacer_softc {
pcitag_t sc_pt;
int sc_dmamap_flags;
-
- /* Power Management */
- void *sc_powerhook;
};
#define READ1(sc, a) bus_space_read_1(sc->iot, sc->aud_ioh, a)
@@ -186,7 +183,6 @@ int auacer_allocmem(struct auacer_softc *, size_t, size_t,
struct auacer_dma *);
int auacer_freemem(struct auacer_softc *, struct auacer_dma *);
-void auacer_powerhook(int, void *);
int auacer_set_rate(struct auacer_softc *, int, u_long);
void auacer_finish_attach(struct device *);
@@ -297,8 +293,6 @@ auacer_attach(struct device *parent, struct device *self, void *aux)
if (ac97_attach(&sc->host_if) != 0)
return;
- sc->sc_powerhook = powerhook_establish(auacer_powerhook, sc);
-
audio_attach_mi(&auacer_hw_if, sc, &sc->sc_dev);
auacer_reset(sc);
@@ -1097,9 +1091,3 @@ auacer_activate(struct device *self, int act)
}
return 0;
}
-
-void
-auacer_powerhook(int why, void *addr)
-{
- auacer_activate(addr, why);
-}
diff --git a/sys/dev/pci/auglx.c b/sys/dev/pci/auglx.c
index 9b524b61147..e9e1ea2b523 100644
--- a/sys/dev/pci/auglx.c
+++ b/sys/dev/pci/auglx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auglx.c,v 1.5 2010/08/27 18:50:56 deraadt Exp $ */
+/* $OpenBSD: auglx.c,v 1.6 2010/09/07 16:21:44 deraadt Exp $ */
/*
* Copyright (c) 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -198,7 +198,6 @@ struct auglx_softc {
struct ac97_host_if host_if;
/* power mgmt */
- void *sc_powerhook;
u_int16_t sc_ext_ctrl;
int sc_dmamap_flags;
@@ -245,7 +244,6 @@ void auglx_free_prd(struct auglx_softc *sc, struct auglx_ring *bm);
int auglx_allocmem(struct auglx_softc *, size_t, size_t, struct auglx_dma *);
void auglx_freemem(struct auglx_softc *, struct auglx_dma *);
void auglx_get_default_params(void *, int, struct audio_params *);
-void auglx_powerhook(int, void *);
struct audio_hw_if auglx_hw_if = {
auglx_open,
@@ -359,10 +357,6 @@ auglx_attach(struct device *parent, struct device *self, void *aux)
return;
}
audio_attach_mi(&auglx_hw_if, sc, &sc->sc_dev);
-
- /* Watch for power changes */
- sc->sc_powerhook = powerhook_establish(auglx_powerhook, sc);
-
}
/* Functions to communicate with the AC97 Codec via the ACC */
@@ -1363,9 +1357,3 @@ auglx_activate(struct device *self, int act)
}
return 0;
}
-
-void
-auglx_powerhook(int why, void *self)
-{
- auglx_activate(self, why);
-}
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c
index 9e7ea163089..685e5eadd55 100644
--- a/sys/dev/pci/auich.c
+++ b/sys/dev/pci/auich.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: auich.c,v 1.90 2010/09/06 19:20:22 deraadt Exp $ */
+/* $OpenBSD: auich.c,v 1.91 2010/09/07 16:21:44 deraadt Exp $ */
/*
* Copyright (c) 2000,2001 Michael Shalayeff
@@ -217,7 +217,6 @@ struct auich_softc {
int pcmo_fifoe;
#endif
- void *powerhook;
int suspend;
u_int16_t ext_ctrl;
int sc_sample_size;
@@ -327,8 +326,6 @@ void auich_get_default_params(void *, int, struct audio_params *);
int auich_suspend(struct auich_softc *);
int auich_resume(struct auich_softc *);
-void auich_powerhook(int, void *);
-
struct audio_hw_if auich_hw_if = {
auich_open,
auich_close,
@@ -556,7 +553,6 @@ auich_attach(parent, self, aux)
/* Watch for power changes */
sc->suspend = DVACT_RESUME;
- sc->powerhook = powerhook_establish(auich_powerhook, sc);
sc->sc_ac97rate = -1;
}
@@ -1954,13 +1950,6 @@ auich_resume(struct auich_softc *sc)
return (0);
}
-void
-auich_powerhook(int why, void *self)
-{
- auich_activate(self, why);
-}
-
-
/* -------------------------------------------------------------------- */
/* Calibrate card (some boards are overclocked and need scaling) */
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index f87cd11077e..fce8bc7208b 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.26 2010/08/27 18:50:56 deraadt Exp $ */
+/* $OpenBSD: autri.c,v 1.27 2010/09/07 16:21:44 deraadt Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -99,7 +99,6 @@ int autri_write_codec(void *sc, u_int8_t a, u_int16_t d);
void autri_reset_codec(void *sc);
enum ac97_host_flags autri_flags_codec(void *);
-void autri_powerhook(int why,void *addr);
int autri_init(void *sc);
struct autri_dma *autri_find_dma(struct autri_softc *, void *);
void autri_setup_channel(struct autri_softc *sc,int mode,
@@ -617,8 +616,6 @@ autri_attach(parent, self, aux)
#if NMIDI > 0
midi_attach_mi(&autri_midi_hw_if, sc, &sc->sc_dev);
#endif
-
- powerhook_establish(autri_powerhook, sc);
}
int
@@ -638,12 +635,6 @@ autri_activate(struct device *self, int act)
return 0;
}
-void
-autri_powerhook(int why,void *addr)
-{
- autri_activate(addr, why);
-}
-
int
autri_init(sc_)
void *sc_;
diff --git a/sys/dev/pci/cs4280.c b/sys/dev/pci/cs4280.c
index 92d4572f12c..4feff85884a 100644
--- a/sys/dev/pci/cs4280.c
+++ b/sys/dev/pci/cs4280.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4280.c,v 1.35 2010/08/27 18:50:57 deraadt Exp $ */
+/* $OpenBSD: cs4280.c,v 1.36 2010/09/07 16:21:44 deraadt Exp $ */
/* $NetBSD: cs4280.c,v 1.5 2000/06/26 04:56:23 simonb Exp $ */
/*
@@ -157,7 +157,6 @@ struct cs4280_softc {
struct ac97_codec_if *codec_if;
struct ac97_host_if host_if;
- void *sc_powerhook; /* Power Hook */
u_int16_t ac97_reg[CS4280_SAVE_REG_MAX + 1]; /* Save ac97 registers */
};
@@ -233,8 +232,6 @@ int cs4280_read_codec(void *sc, u_int8_t a, u_int16_t *d);
int cs4280_write_codec(void *sc, u_int8_t a, u_int16_t d);
void cs4280_reset_codec(void *sc);
-void cs4280_powerhook(int, void *);
-
void cs4280_clear_fifos(struct cs4280_softc *);
#if NMIDI > 0
@@ -591,7 +588,6 @@ cs4280_attachhook(void *xsc)
#if NMIDI > 0
midi_attach_mi(&cs4280_midi_hw_if, sc, &sc->sc_dev);
#endif
- sc->sc_powerhook = powerhook_establish(cs4280_powerhook, sc);
}
void
@@ -1865,12 +1861,6 @@ cs4280_activate(struct device *self, int act)
}
void
-cs4280_powerhook(int why, void *v)
-{
- cs4280_activate(v, why);
-}
-
-void
cs4280_clear_fifos(sc)
struct cs4280_softc *sc;
{
diff --git a/sys/dev/pci/cs4281.c b/sys/dev/pci/cs4281.c
index dad225ed926..d712edd1945 100644
--- a/sys/dev/pci/cs4281.c
+++ b/sys/dev/pci/cs4281.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cs4281.c,v 1.24 2010/08/27 18:50:57 deraadt Exp $ */
+/* $OpenBSD: cs4281.c,v 1.25 2010/09/07 16:21:44 deraadt Exp $ */
/* $Tera: cs4281.c,v 1.18 2000/12/27 14:24:45 tacha Exp $ */
/*
@@ -140,7 +140,6 @@ struct cs4281_softc {
struct ac97_host_if host_if;
/* Power Management */
- void *sc_powerhook; /* Power hook */
u_int16_t ac97_reg[CS4281_SAVE_REG_MAX + 1]; /* Save ac97 registers */
};
@@ -183,8 +182,6 @@ int cs4281_read_codec(void *, u_int8_t , u_int16_t *);
int cs4281_write_codec(void *, u_int8_t, u_int16_t);
void cs4281_reset_codec(void *);
-void cs4281_powerhook(int, void *);
-
int cs4281_mixer_set_port(void *, mixer_ctrl_t *);
int cs4281_mixer_get_port(void *, mixer_ctrl_t *);
int cs4281_query_devinfo(void *, mixer_devinfo_t *);
@@ -368,8 +365,6 @@ cs4281_attach(parent, self, aux)
#if NMIDI > 0
midi_attach_mi(&cs4281_midi_hw_if, sc, &sc->sc_dev);
#endif
-
- sc->sc_powerhook = powerhook_establish(cs4281_powerhook, sc);
}
@@ -1166,12 +1161,6 @@ cs4281_activate(struct device *self, int act)
}
void
-cs4281_powerhook(int why, void *v)
-{
- cs4281_activate(v, why);
-}
-
-void
cs4281_reset_codec(void *addr)
{
struct cs4281_softc *sc;
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c
index eb33bda86fb..156a8bee9da 100644
--- a/sys/dev/pci/esa.c
+++ b/sys/dev/pci/esa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: esa.c,v 1.21 2010/08/27 18:50:57 deraadt Exp $ */
+/* $OpenBSD: esa.c,v 1.22 2010/09/07 16:21:44 deraadt Exp $ */
/* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */
/*
@@ -161,7 +161,6 @@ int esa_add_list(struct esa_voice *, struct esa_list *, u_int16_t,
void esa_remove_list(struct esa_voice *, struct esa_list *, int);
/* power management */
-void esa_powerhook(int, void *);
int esa_suspend(struct esa_softc *);
int esa_resume(struct esa_softc *);
@@ -1145,13 +1144,6 @@ esa_attach(struct device *parent, struct device *self, void *aux)
sc->sc_audiodev[i] =
audio_attach_mi(&esa_hw_if, &sc->voice[i], &sc->sc_dev);
}
-
- sc->powerhook = powerhook_establish(esa_powerhook, sc);
- if (sc->powerhook == NULL)
- printf("%s: WARNING: unable to establish powerhook\n",
- sc->sc_dev.dv_xname);
-
- return;
}
int
@@ -1622,12 +1614,6 @@ esa_activate(struct device *self, int act)
return 0;
}
-void
-esa_powerhook(int why, void *hdl)
-{
- esa_activate(hdl, why);
-}
-
int
esa_suspend(struct esa_softc *sc)
{
diff --git a/sys/dev/pci/esavar.h b/sys/dev/pci/esavar.h
index eff4a9ac62c..f7e6299d8c1 100644
--- a/sys/dev/pci/esavar.h
+++ b/sys/dev/pci/esavar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: esavar.h,v 1.1 2002/04/08 01:47:33 frantzen Exp $ */
+/* $OpenBSD: esavar.h,v 1.2 2010/09/07 16:21:44 deraadt Exp $ */
/* $NetBSD: esavar.h,v 1.4 2002/03/16 14:34:01 jmcneill Exp $ */
/*
@@ -133,6 +133,5 @@ struct esa_softc
int type; /* Allegro-1 or Maestro 3? */
int delay1, delay2;
- void *powerhook;
u_int16_t *savemem;
};
diff --git a/sys/dev/pci/eso.c b/sys/dev/pci/eso.c
index 2094778e71a..d28987f954f 100644
--- a/sys/dev/pci/eso.c
+++ b/sys/dev/pci/eso.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: eso.c,v 1.33 2010/08/27 18:50:57 deraadt Exp $ */
+/* $OpenBSD: eso.c,v 1.34 2010/09/07 16:21:44 deraadt Exp $ */
/* $NetBSD: eso.c,v 1.48 2006/12/18 23:13:39 kleink Exp $ */
/*
@@ -130,9 +130,6 @@ int eso_trigger_input(void *, void *, void *, int,
void (*)(void *), void *, struct audio_params *);
void eso_setup(struct eso_softc *, int);
-void eso_powerhook(int, void *);
-
-
struct audio_hw_if eso_hw_if = {
eso_open,
eso_close,
@@ -310,8 +307,6 @@ eso_attach(struct device *parent, struct device *self, void *aux)
aa.hdl = NULL;
(void)config_found(&sc->sc_dev, &aa, audioprint);
- sc->sc_powerhook = powerhook_establish(&eso_powerhook, sc);
-
aa.type = AUDIODEV_TYPE_MPU;
aa.hwif = NULL;
aa.hdl = NULL;
@@ -2085,10 +2080,3 @@ eso_activate(struct device *self, int act)
}
return 0;
}
-
-void
-eso_powerhook(int why, void *self)
-{
- eso_activate(self, why);
-
-}
diff --git a/sys/dev/pci/esovar.h b/sys/dev/pci/esovar.h
index f130392a37f..2dd129c9ffe 100644
--- a/sys/dev/pci/esovar.h
+++ b/sys/dev/pci/esovar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: esovar.h,v 1.4 2007/11/11 01:32:52 jakemsr Exp $ */
+/* $OpenBSD: esovar.h,v 1.5 2010/09/07 16:21:44 deraadt Exp $ */
/* $NetBSD: esovar.h,v 1.5 2004/05/25 21:38:11 kleink Exp $ */
/*
@@ -89,7 +89,6 @@ struct eso_softc {
struct device sc_dev;
pci_intr_handle_t * sc_ih;
unsigned int sc_revision; /* PCI Revision ID */
- void * sc_powerhook;
/* Optionally deferred configuration of Audio 1 DMAC I/O space */
struct pci_attach_args sc_pa;
diff --git a/sys/dev/pci/i82365_pci.c b/sys/dev/pci/i82365_pci.c
index 9aed3ab08dc..e1e4aab8a08 100644
--- a/sys/dev/pci/i82365_pci.c
+++ b/sys/dev/pci/i82365_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i82365_pci.c,v 1.10 2010/07/02 04:23:15 blambert Exp $ */
+/* $OpenBSD: i82365_pci.c,v 1.11 2010/09/07 16:21:44 deraadt Exp $ */
/* $NetBSD: i82365_pci.c,v 1.11 2000/02/24 03:42:44 itohy Exp $ */
/*
@@ -198,7 +198,6 @@ pcic_pci_attach(parent, self, aux)
pcic_write(h, PCIC_CSC_INTR,
(sc->irq << PCIC_CSC_INTR_IRQ_SHIFT) |
PCIC_CSC_INTR_CD_ENABLE);
- powerhook_establish(pcic_power, h);
}
}
} else
diff --git a/sys/dev/pci/if_bge.c b/sys/dev/pci/if_bge.c
index 9a79cfe9275..fe4a4c7fa0f 100644
--- a/sys/dev/pci/if_bge.c
+++ b/sys/dev/pci/if_bge.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bge.c,v 1.301 2010/08/31 17:13:44 deraadt Exp $ */
+/* $OpenBSD: if_bge.c,v 1.302 2010/09/07 16:21:44 deraadt Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -151,7 +151,6 @@ int bge_intr(void *);
void bge_start(struct ifnet *);
int bge_ioctl(struct ifnet *, u_long, caddr_t);
void bge_init(void *);
-void bge_powerhook(int, void *);
void bge_stop_block(struct bge_softc *, bus_size_t, u_int32_t);
void bge_stop(struct bge_softc *);
void bge_watchdog(struct ifnet *);
@@ -2265,7 +2264,6 @@ bge_attach(struct device *parent, struct device *self, void *aux)
ether_ifattach(ifp);
sc->sc_shutdownhook = shutdownhook_establish(bge_shutdown, sc);
- sc->sc_powerhook = powerhook_establish(bge_powerhook, sc);
timeout_set(&sc->bge_timeout, bge_tick, sc);
timeout_set(&sc->bge_rxtimeout, bge_rxtick, sc);
@@ -3737,9 +3735,3 @@ bge_link_upd(struct bge_softc *sc)
BGE_MACSTAT_CFG_CHANGED|BGE_MACSTAT_MI_COMPLETE|
BGE_MACSTAT_LINK_CHANGED);
}
-
-void
-bge_powerhook(int why, void *arg)
-{
- bge_activate(arg, why);
-}
diff --git a/sys/dev/pci/if_bgereg.h b/sys/dev/pci/if_bgereg.h
index 1e40661ac10..e733d7db0c7 100644
--- a/sys/dev/pci/if_bgereg.h
+++ b/sys/dev/pci/if_bgereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bgereg.h,v 1.101 2010/07/09 00:04:42 sthen Exp $ */
+/* $OpenBSD: if_bgereg.h,v 1.102 2010/09/07 16:21:44 deraadt Exp $ */
/*
* Copyright (c) 2001 Wind River Systems
@@ -2641,7 +2641,6 @@ struct bge_softc {
int bge_txcnt;
struct timeout bge_timeout;
struct timeout bge_rxtimeout;
- void *sc_powerhook;
void *sc_shutdownhook;
u_int32_t bge_rx_discards;
u_int32_t bge_tx_discards;
diff --git a/sys/dev/pci/if_bnxreg.h b/sys/dev/pci/if_bnxreg.h
index 19462818bfa..466df061031 100644
--- a/sys/dev/pci/if_bnxreg.h
+++ b/sys/dev/pci/if_bnxreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_bnxreg.h,v 1.35 2010/05/24 21:23:23 sthen Exp $ */
+/* $OpenBSD: if_bnxreg.h,v 1.36 2010/09/07 16:21:44 deraadt Exp $ */
/*-
* Copyright (c) 2006 Broadcom Corporation
@@ -4776,7 +4776,6 @@ struct bnx_softc {
bus_size_t bnx_size;
void *bnx_intrhand; /* Interrupt handler */
- void *bnx_powerhook;
void *bnx_shutdownhook;
/* ASIC Chip ID. */
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 10991235aed..51152f746b5 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.246 2010/08/31 17:13:44 deraadt Exp $ */
+/* $OpenBSD: if_em.c,v 1.247 2010/09/07 16:21:44 deraadt Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -170,7 +170,6 @@ void em_attach(struct device *, struct device *, void *);
void em_defer_attach(struct device*);
int em_detach(struct device *, int);
int em_activate(struct device *, int);
-void em_powerhook(int, void *);
int em_intr(void *);
void em_start(struct ifnet *);
int em_ioctl(struct ifnet *, u_long, caddr_t);
@@ -281,9 +280,6 @@ em_defer_attach(struct device *self)
pci_intr_disestablish(pc, sc->sc_intrhand);
sc->sc_intrhand = 0;
- if (sc->sc_powerhook != NULL)
- powerhook_disestablish(sc->sc_powerhook);
-
em_stop(sc, 1);
em_free_pci_resources(sc);
@@ -507,7 +503,6 @@ em_attach(struct device *parent, struct device *self, void *aux)
sc->hw.icp_xxxx_is_link_up = FALSE;
INIT_DEBUGOUT("em_attach: end");
- sc->sc_powerhook = powerhook_establish(em_powerhook, sc);
return;
err_mac_addr:
@@ -1857,9 +1852,6 @@ em_detach(struct device *self, int flags)
pci_intr_disestablish(pc, sc->sc_intrhand);
sc->sc_intrhand = 0;
- if (sc->sc_powerhook != NULL)
- powerhook_disestablish(sc->sc_powerhook);
-
em_stop(sc, 1);
em_free_pci_resources(sc);
@@ -1898,12 +1890,6 @@ em_activate(struct device *self, int act)
return (rv);
}
-void
-em_powerhook(int why, void *arg)
-{
- em_activate(arg, why);
-}
-
/*********************************************************************
*
* Workaround for SmartSpeed on 82541 and 82547 controllers
diff --git a/sys/dev/pci/if_em.h b/sys/dev/pci/if_em.h
index e2e5e5de94d..d9cab877ffa 100644
--- a/sys/dev/pci/if_em.h
+++ b/sys/dev/pci/if_em.h
@@ -32,7 +32,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
/* $FreeBSD: if_em.h,v 1.26 2004/09/01 23:22:41 pdeuskar Exp $ */
-/* $OpenBSD: if_em.h,v 1.47 2010/04/20 22:05:43 tedu Exp $ */
+/* $OpenBSD: if_em.h,v 1.48 2010/09/07 16:21:44 deraadt Exp $ */
#ifndef _EM_H_DEFINED_
#define _EM_H_DEFINED_
@@ -325,7 +325,6 @@ struct em_softc {
struct timeout em_intr_enable;
struct timeout timer_handle;
struct timeout tx_fifo_timer_handle;
- void *sc_powerhook;
#ifdef __STRICT_ALIGNMENT
/* Used for carrying forward alignment adjustments */
diff --git a/sys/dev/pci/if_ipw.c b/sys/dev/pci/if_ipw.c
index 797eb156847..e670fa0dec0 100644
--- a/sys/dev/pci/if_ipw.c
+++ b/sys/dev/pci/if_ipw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipw.c,v 1.92 2010/08/27 20:09:01 deraadt Exp $ */
+/* $OpenBSD: if_ipw.c,v 1.93 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -66,7 +66,6 @@ int ipw_match(struct device *, void *, void *);
void ipw_attach(struct device *, struct device *, void *);
int ipw_activate(struct device *, int);
void ipw_resume(void *, void *);
-void ipw_powerhook(int, void *);
int ipw_dma_alloc(struct ipw_softc *);
void ipw_release(struct ipw_softc *);
int ipw_media_change(struct ifnet *);
@@ -277,8 +276,6 @@ ipw_attach(struct device *parent, struct device *self, void *aux)
ic->ic_send_mgmt = ipw_send_mgmt;
ieee80211_media_init(ifp, ipw_media_change, ipw_media_status);
- sc->powerhook = powerhook_establish(ipw_powerhook, sc);
-
#if NBPFILTER > 0
bpfattach(&sc->sc_drvbpf, ifp, DLT_IEEE802_11_RADIO,
sizeof (struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN);
@@ -339,12 +336,6 @@ ipw_resume(void *arg1, void *arg2)
splx(s);
}
-void
-ipw_powerhook(int why, void *arg)
-{
- ipw_activate(arg, why);
-}
-
int
ipw_dma_alloc(struct ipw_softc *sc)
{
diff --git a/sys/dev/pci/if_ipwvar.h b/sys/dev/pci/if_ipwvar.h
index 5c5d83b9abf..4f4b7f41a02 100644
--- a/sys/dev/pci/if_ipwvar.h
+++ b/sys/dev/pci/if_ipwvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ipwvar.h,v 1.20 2010/08/03 18:26:25 kettenis Exp $ */
+/* $OpenBSD: if_ipwvar.h,v 1.21 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -128,7 +128,6 @@ struct ipw_softc {
uint32_t rxcur;
int txfree;
- void *powerhook;
struct workq_task sc_resume_wqt;
#if NBPFILTER > 0
diff --git a/sys/dev/pci/if_iwi.c b/sys/dev/pci/if_iwi.c
index 481d4e18924..afdefcf79a3 100644
--- a/sys/dev/pci/if_iwi.c
+++ b/sys/dev/pci/if_iwi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwi.c,v 1.109 2010/08/27 20:09:01 deraadt Exp $ */
+/* $OpenBSD: if_iwi.c,v 1.110 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2004-2008
@@ -76,7 +76,6 @@ int iwi_match(struct device *, void *, void *);
void iwi_attach(struct device *, struct device *, void *);
int iwi_activate(struct device *, int);
void iwi_resume(void *, void *);
-void iwi_powerhook(int, void *);
int iwi_alloc_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *);
void iwi_reset_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *);
void iwi_free_cmd_ring(struct iwi_softc *, struct iwi_cmd_ring *);
@@ -313,8 +312,6 @@ iwi_attach(struct device *parent, struct device *self, void *aux)
ic->ic_send_mgmt = iwi_send_mgmt;
ieee80211_media_init(ifp, iwi_media_change, iwi_media_status);
- sc->powerhook = powerhook_establish(iwi_powerhook, sc);
-
#if NBPFILTER > 0
bpfattach(&sc->sc_drvbpf, ifp, DLT_IEEE802_11_RADIO,
sizeof (struct ieee80211_frame) + IEEE80211_RADIOTAP_HDRLEN);
@@ -381,12 +378,6 @@ iwi_resume(void *arg1, void *arg2)
splx(s);
}
-void
-iwi_powerhook(int why, void *arg)
-{
- iwi_activate(arg, why);
-}
-
int
iwi_alloc_cmd_ring(struct iwi_softc *sc, struct iwi_cmd_ring *ring)
{
diff --git a/sys/dev/pci/if_iwivar.h b/sys/dev/pci/if_iwivar.h
index ecd7791dfb5..34d1fb4097f 100644
--- a/sys/dev/pci/if_iwivar.h
+++ b/sys/dev/pci/if_iwivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwivar.h,v 1.22 2010/08/03 18:26:25 kettenis Exp $ */
+/* $OpenBSD: if_iwivar.h,v 1.23 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2004-2006
@@ -114,7 +114,6 @@ struct iwi_softc {
int sc_tx_timer;
- void *powerhook;
struct workq_task sc_resume_wqt;
#if NBPFILTER > 0
diff --git a/sys/dev/pci/if_iwn.c b/sys/dev/pci/if_iwn.c
index dc4d635065c..9839fed3b50 100644
--- a/sys/dev/pci/if_iwn.c
+++ b/sys/dev/pci/if_iwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwn.c,v 1.104 2010/08/27 20:09:01 deraadt Exp $ */
+/* $OpenBSD: if_iwn.c,v 1.105 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2007-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -107,7 +107,6 @@ void iwn_radiotap_attach(struct iwn_softc *);
int iwn_detach(struct device *, int);
int iwn_activate(struct device *, int);
void iwn_resume(void *, void *);
-void iwn_powerhook(int, void *);
int iwn_nic_lock(struct iwn_softc *);
int iwn_eeprom_lock(struct iwn_softc *);
int iwn_init_otprom(struct iwn_softc *);
@@ -568,9 +567,6 @@ iwn_attach(struct device *parent, struct device *self, void *aux)
iwn_radiotap_attach(sc);
#endif
timeout_set(&sc->calib_to, iwn_calib_timeout, sc);
-
- sc->powerhook = powerhook_establish(iwn_powerhook, sc);
-
return;
/* Free allocated memory if something failed during attachment. */
@@ -713,9 +709,6 @@ iwn_detach(struct device *self, int flags)
if (sc->sc_ih != NULL)
pci_intr_disestablish(sc->sc_pct, sc->sc_ih);
- if (sc->powerhook != NULL)
- powerhook_disestablish(sc->powerhook);
-
/* Free DMA resources. */
iwn_free_rx_ring(sc, &sc->rxq);
for (qid = 0; qid < sc->sc_hal->ntxqs; qid++)
@@ -786,12 +779,6 @@ iwn_resume(void *arg1, void *arg2)
splx(s);
}
-void
-iwn_powerhook(int why, void *arg)
-{
- iwn_activate(arg, why);
-}
-
int
iwn_nic_lock(struct iwn_softc *sc)
{
diff --git a/sys/dev/pci/if_iwnvar.h b/sys/dev/pci/if_iwnvar.h
index 4f882e856b7..f806348f377 100644
--- a/sys/dev/pci/if_iwnvar.h
+++ b/sys/dev/pci/if_iwnvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_iwnvar.h,v 1.20 2010/07/23 06:43:00 phessler Exp $ */
+/* $OpenBSD: if_iwnvar.h,v 1.21 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2007, 2008
@@ -284,7 +284,6 @@ struct iwn_softc {
uint8_t chainmask;
int sc_tx_timer;
- void *powerhook;
struct workq_task sc_resume_wqt;
#if NBPFILTER > 0
diff --git a/sys/dev/pci/if_nfe.c b/sys/dev/pci/if_nfe.c
index f5217dfa714..02f6da6a142 100644
--- a/sys/dev/pci/if_nfe.c
+++ b/sys/dev/pci/if_nfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfe.c,v 1.95 2010/08/31 17:13:44 deraadt Exp $ */
+/* $OpenBSD: if_nfe.c,v 1.96 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2006, 2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -70,7 +70,6 @@
int nfe_match(struct device *, void *, void *);
void nfe_attach(struct device *, struct device *, void *);
int nfe_activate(struct device *, int);
-void nfe_powerhook(int, void *);
void nfe_miibus_statchg(struct device *);
int nfe_miibus_readreg(struct device *, int, int);
void nfe_miibus_writereg(struct device *, int, int, int);
@@ -383,14 +382,6 @@ nfe_attach(struct device *parent, struct device *self, void *aux)
ether_ifattach(ifp);
timeout_set(&sc->sc_tick_ch, nfe_tick, sc);
-
- sc->sc_powerhook = powerhook_establish(nfe_powerhook, sc);
-}
-
-void
-nfe_powerhook(int why, void *arg)
-{
- nfe_activate(arg, why);
}
void
diff --git a/sys/dev/pci/if_nfevar.h b/sys/dev/pci/if_nfevar.h
index 7aae8e5099f..b02d248574c 100644
--- a/sys/dev/pci/if_nfevar.h
+++ b/sys/dev/pci/if_nfevar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_nfevar.h,v 1.13 2007/12/05 08:30:33 jsg Exp $ */
+/* $OpenBSD: if_nfevar.h,v 1.14 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2005 Jonathan Gray <jsg@openbsd.org>
@@ -73,7 +73,6 @@ struct nfe_softc {
bus_dma_tag_t sc_dmat;
struct mii_data sc_mii;
struct timeout sc_tick_ch;
- void *sc_powerhook;
int sc_if_flags;
u_int sc_flags;
diff --git a/sys/dev/pci/if_re_pci.c b/sys/dev/pci/if_re_pci.c
index 993167bf53c..a6907ba5929 100644
--- a/sys/dev/pci/if_re_pci.c
+++ b/sys/dev/pci/if_re_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_re_pci.c,v 1.29 2010/07/27 21:56:11 todd Exp $ */
+/* $OpenBSD: if_re_pci.c,v 1.30 2010/09/07 16:21:45 deraadt Exp $ */
/*
* Copyright (c) 2005 Peter Valchev <pvalchev@openbsd.org>
@@ -226,10 +226,6 @@ re_pci_detach(struct device *self, int flags)
ether_ifdetach(ifp);
if_detach(ifp);
- /* No more hooks */
- if (sc->sc_pwrhook != NULL)
- powerhook_disestablish(sc->sc_pwrhook);
-
/* Disable interrupts */
if (psc->sc_ih != NULL)
pci_intr_disestablish(psc->sc_pc, psc->sc_ih);
diff --git a/sys/dev/pci/if_wi_pci.c b/sys/dev/pci/if_wi_pci.c
index 9a6fdfe6c3f..86d9e57ba7e 100644
--- a/sys/dev/pci/if_wi_pci.c
+++ b/sys/dev/pci/if_wi_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_pci.c,v 1.47 2010/08/30 20:42:54 deraadt Exp $ */
+/* $OpenBSD: if_wi_pci.c,v 1.48 2010/09/07 16:21:45 deraadt Exp $ */
/*
* Copyright (c) 2001-2003 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -85,11 +85,9 @@ int wi_pci_tmd_attach(struct pci_attach_args *pa, struct wi_softc *sc);
int wi_pci_native_attach(struct pci_attach_args *pa, struct wi_softc *sc);
int wi_pci_common_attach(struct pci_attach_args *pa, struct wi_softc *sc);
void wi_pci_plx_print_cis(struct wi_softc *);
-void wi_pci_powerhook(int, void *);
struct wi_pci_softc {
struct wi_softc sc_wi; /* real softc */
- void *sc_powerhook;
struct workq_task sc_resume_wqt;
};
@@ -147,7 +145,6 @@ wi_pci_match(struct device *parent, void *match, void *aux)
void
wi_pci_attach(struct device *parent, struct device *self, void *aux)
{
- struct wi_pci_softc *psc = (struct wi_pci_softc *)self;
struct wi_softc *sc = (struct wi_softc *)self;
struct pci_attach_args *pa = aux;
const struct wi_pci_product *pp;
@@ -157,8 +154,6 @@ wi_pci_attach(struct device *parent, struct device *self, void *aux)
return;
printf("\n");
wi_attach(sc, &wi_func_io);
-
- psc->sc_powerhook = powerhook_establish(wi_pci_powerhook, sc);
}
int
@@ -201,12 +196,6 @@ wi_pci_resume(void *arg1, void *arg2)
splx(s);
}
-void
-wi_pci_powerhook(int why, void *arg)
-{
- wi_pci_activate(arg, why);
-}
-
/*
* ACEX EP1K30-based PCMCIA->PCI bridge attachment.
*
diff --git a/sys/dev/pci/if_wpi.c b/sys/dev/pci/if_wpi.c
index 94d18b1e075..1b3017313a7 100644
--- a/sys/dev/pci/if_wpi.c
+++ b/sys/dev/pci/if_wpi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpi.c,v 1.108 2010/08/27 20:09:01 deraadt Exp $ */
+/* $OpenBSD: if_wpi.c,v 1.109 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -77,7 +77,6 @@ void wpi_radiotap_attach(struct wpi_softc *);
int wpi_detach(struct device *, int);
int wpi_activate(struct device *, int);
void wpi_resume(void *, void *);
-void wpi_powerhook(int, void *);
int wpi_nic_lock(struct wpi_softc *);
int wpi_read_prom_data(struct wpi_softc *, uint32_t, void *, int);
int wpi_dma_contig_alloc(bus_dma_tag_t, struct wpi_dma_info *,
@@ -327,9 +326,6 @@ wpi_attach(struct device *parent, struct device *self, void *aux)
wpi_radiotap_attach(sc);
#endif
timeout_set(&sc->calib_to, wpi_calib_timeout, sc);
-
- sc->powerhook = powerhook_establish(wpi_powerhook, sc);
-
return;
/* Free allocated memory if something failed during attachment. */
@@ -372,9 +368,6 @@ wpi_detach(struct device *self, int flags)
if (sc->sc_ih != NULL)
pci_intr_disestablish(sc->sc_pct, sc->sc_ih);
- if (sc->powerhook != NULL)
- powerhook_disestablish(sc->powerhook);
-
/* Free DMA resources. */
wpi_free_rx_ring(sc, &sc->rxq);
for (qid = 0; qid < WPI_NTXQUEUES; qid++)
@@ -436,12 +429,6 @@ wpi_resume(void *arg1, void *arg2)
splx(s);
}
-void
-wpi_powerhook(int why, void *arg)
-{
- wpi_activate(arg, why);
-}
-
int
wpi_nic_lock(struct wpi_softc *sc)
{
diff --git a/sys/dev/pci/if_wpivar.h b/sys/dev/pci/if_wpivar.h
index 0c981701cc1..df92cb7fa9d 100644
--- a/sys/dev/pci/if_wpivar.h
+++ b/sys/dev/pci/if_wpivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wpivar.h,v 1.22 2010/07/22 14:42:43 kettenis Exp $ */
+/* $OpenBSD: if_wpivar.h,v 1.23 2010/09/07 16:21:45 deraadt Exp $ */
/*-
* Copyright (c) 2006-2008
@@ -180,7 +180,6 @@ struct wpi_softc {
int8_t maxpwr[IEEE80211_CHAN_MAX];
int sc_tx_timer;
- void *powerhook;
struct workq_task sc_resume_wqt;
#if NBPFILTER > 0
diff --git a/sys/dev/pci/maestro.c b/sys/dev/pci/maestro.c
index 34d63e2a87c..8a9bd6acfb3 100644
--- a/sys/dev/pci/maestro.c
+++ b/sys/dev/pci/maestro.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: maestro.c,v 1.30 2010/08/27 18:50:57 deraadt Exp $ */
+/* $OpenBSD: maestro.c,v 1.31 2010/09/07 16:21:45 deraadt Exp $ */
/* $FreeBSD: /c/ncvs/src/sys/dev/sound/pci/maestro.c,v 1.3 2000/11/21 12:22:11 julian Exp $ */
/*
* FreeBSD's ESS Agogo/Maestro driver
@@ -455,7 +455,6 @@ struct maestro_softc {
struct ac97_host_if host_if;
struct audio_device *sc_audev;
- void *powerhook;
int suspend;
struct maestro_channel play;
@@ -511,7 +510,6 @@ void maestro_initcodec(void *);
void maestro_set_speed(struct maestro_channel *, u_long *);
void maestro_init(struct maestro_softc *);
void maestro_power(struct maestro_softc *, int);
-void maestro_powerhook(int, void *);
void maestro_channel_start(struct maestro_channel *);
void maestro_channel_stop(struct maestro_channel *);
@@ -767,10 +765,6 @@ maestro_attach(parent, self, aux)
/* Attach audio */
audio_attach_mi(&maestro_hw_if, sc, &sc->dev);
-
- /* Hook power changes */
- sc->powerhook = powerhook_establish(maestro_powerhook, sc);
-
return;
bad:
@@ -1553,12 +1547,6 @@ maestro_activate(struct device *self, int act)
}
void
-maestro_powerhook(int why, void *v)
-{
- maestro_activate(v, why);
-}
-
-void
maestro_power(sc, status)
struct maestro_softc *sc;
int status;
diff --git a/sys/dev/pci/neo.c b/sys/dev/pci/neo.c
index 5e70c2ff731..5b4c2320510 100644
--- a/sys/dev/pci/neo.c
+++ b/sys/dev/pci/neo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: neo.c,v 1.25 2010/08/27 18:49:40 deraadt Exp $ */
+/* $OpenBSD: neo.c,v 1.26 2010/09/07 16:21:45 deraadt Exp $ */
/*
* Copyright (c) 1999 Cameron Grant <gandalf@vilnya.demon.co.uk>
@@ -154,8 +154,6 @@ struct neo_softc {
struct ac97_codec_if *codec_if;
struct ac97_host_if host_if;
-
- void *powerhook;
};
static struct neo_firmware *nf;
@@ -208,8 +206,6 @@ void neo_free(void *, void *, int);
size_t neo_round_buffersize(void *, int, size_t);
int neo_get_props(void *);
void neo_set_mixer(struct neo_softc *sc, int a, int d);
-void neo_powerhook(int why, void *arg);
-
struct cfdriver neo_cd = {
NULL, "neo", DV_DULL
@@ -621,8 +617,6 @@ neo_attach(parent, self, aux)
if ((error = ac97_attach(&sc->host_if)) != 0)
return;
- sc->powerhook = powerhook_establish(neo_powerhook, sc);
-
audio_attach_mi(&neo_hw_if, sc, &sc->dev);
return;
@@ -644,12 +638,6 @@ neo_activate(struct device *self, int act)
return 0;
}
-void
-neo_powerhook(int why, void *addr)
-{
- neo_activate(addr, why);
-}
-
int
neo_match(parent, match, aux)
struct device *parent;
diff --git a/sys/dev/pci/ohci_pci.c b/sys/dev/pci/ohci_pci.c
index 396beae47f6..dda8650d4d0 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.35 2010/08/30 21:30:15 deraadt Exp $ */
+/* $OpenBSD: ohci_pci.c,v 1.36 2010/09/07 16:21:45 deraadt Exp $ */
/* $NetBSD: ohci_pci.c,v 1.23 2002/10/02 16:51:47 thorpej Exp $ */
/*
@@ -189,12 +189,6 @@ ohci_pci_attach_deferred(struct device *self)
splx(s);
return;
}
-
- sc->sc.sc_powerhook = powerhook_establish(ohci_powerhook, &sc->sc);
- if (sc->sc.sc_powerhook == NULL)
- printf("%s: unable to establish powerhook\n",
- sc->sc.sc_bus.bdev.dv_xname);
-
splx(s);
/* Attach usb device. */
@@ -212,9 +206,6 @@ ohci_pci_detach(struct device *self, int flags)
if (rv)
return (rv);
- if (sc->sc.sc_powerhook != NULL)
- powerhook_disestablish(sc->sc.sc_powerhook);
-
if (sc->sc_ih != NULL) {
pci_intr_disestablish(sc->sc_pc, sc->sc_ih);
sc->sc_ih = NULL;
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c
index 1feb1a395e3..ee07d00828f 100644
--- a/sys/dev/pci/pccbb.c
+++ b/sys/dev/pci/pccbb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pccbb.c,v 1.81 2010/09/06 18:34:34 kettenis Exp $ */
+/* $OpenBSD: pccbb.c,v 1.82 2010/09/07 16:21:45 deraadt Exp $ */
/* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */
/*
@@ -148,7 +148,6 @@ int pccbb_pcmcia_card_detect(pcmcia_chipset_handle_t pch);
void pccbb_pcmcia_do_io_map(struct pcic_handle *, int);
void pccbb_pcmcia_wait_ready(struct pcic_handle *);
void pccbb_pcmcia_do_mem_map(struct pcic_handle *, int);
-void pccbb_powerhook(int, void *);
/* bus-space allocation and deallocation functions */
int pccbb_rbus_cb_space_alloc(cardbus_chipset_tag_t, rbus_tag_t,
@@ -502,8 +501,6 @@ pccbb_pci_callback(struct device *self)
sc->sc_pil = NULL;
sc->sc_pil_intr_enable = 1;
- powerhook_establish(pccbb_powerhook, sc);
-
sockstat = bus_space_read_4(base_memt, base_memh, CB_SOCKET_STAT);
if ((sockstat & CB_SOCKET_STAT_CD) == 0)
sc->sc_flags |= CBB_CARDEXIST;
@@ -2904,9 +2901,3 @@ pccbbactivate(struct device *self, int act)
}
return (rv);
}
-
-void
-pccbb_powerhook(int why, void *arg)
-{
- pccbbactivate(arg, why);
-}
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 46d4fd8b39c..96ac03f5c77 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.c,v 1.85 2010/09/06 19:20:23 deraadt Exp $ */
+/* $OpenBSD: pci.c,v 1.86 2010/09/07 16:21:45 deraadt Exp $ */
/* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */
/*
@@ -49,7 +49,6 @@
int pcimatch(struct device *, void *, void *);
void pciattach(struct device *, struct device *, void *);
int pcidetach(struct device *, int);
-void pcipowerhook(int, void *);
int pciactivate(struct device *, int);
void pci_suspend(struct pci_softc *);
void pci_resume(struct pci_softc *);
@@ -163,7 +162,6 @@ pciattach(struct device *parent, struct device *self, void *aux)
printf("\n");
LIST_INIT(&sc->sc_devs);
- sc->sc_powerhook = powerhook_establish(pcipowerhook, sc);
sc->sc_iot = pba->pba_iot;
sc->sc_memt = pba->pba_memt;
@@ -213,20 +211,6 @@ pciactivate(struct device *self, int act)
return (rv);
}
-/* save and restore the pci config space */
-void
-pcipowerhook(int why, void *arg)
-{
- switch (why) {
- case DVACT_SUSPEND:
- pci_suspend(arg);
- break;
- case DVACT_RESUME:
- pci_resume(arg);
- break;
- }
-}
-
void
pci_suspend(struct pci_softc *sc)
{
diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h
index ad5a5c12649..d1b36b41f4b 100644
--- a/sys/dev/pci/pcivar.h
+++ b/sys/dev/pci/pcivar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: pcivar.h,v 1.62 2010/09/05 18:14:33 kettenis Exp $ */
+/* $OpenBSD: pcivar.h,v 1.63 2010/09/07 16:21:45 deraadt Exp $ */
/* $NetBSD: pcivar.h,v 1.23 1997/06/06 23:48:05 thorpej Exp $ */
/*
@@ -183,7 +183,6 @@ struct pci_softc {
struct extent *sc_ioex;
struct extent *sc_memex;
struct extent *sc_pmemex;
- void *sc_powerhook;
LIST_HEAD(, pci_dev) sc_devs;
int sc_domain, sc_bus, sc_maxndevs;
pcitag_t *sc_bridgetag;
diff --git a/sys/dev/pci/sdhc_pci.c b/sys/dev/pci/sdhc_pci.c
index c9bd33d6446..32225b63dea 100644
--- a/sys/dev/pci/sdhc_pci.c
+++ b/sys/dev/pci/sdhc_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sdhc_pci.c,v 1.9 2010/08/27 15:41:42 deraadt Exp $ */
+/* $OpenBSD: sdhc_pci.c,v 1.10 2010/09/07 16:21:46 deraadt Exp $ */
/*
* Copyright (c) 2006 Uwe Stuehler <uwe@openbsd.org>
@@ -143,9 +143,8 @@ sdhc_pci_attach(struct device *parent, struct device *self, void *aux)
}
/*
- * Establish power and shutdown hooks.
+ * Establish shutdown hooks.
*/
- (void)powerhook_establish(sdhc_powerhook, &sc->sc);
(void)shutdownhook_establish(sdhc_shutdown, &sc->sc);
}
diff --git a/sys/dev/pci/yds.c b/sys/dev/pci/yds.c
index 530c5bf1c88..c19cbe467a6 100644
--- a/sys/dev/pci/yds.c
+++ b/sys/dev/pci/yds.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: yds.c,v 1.36 2010/09/06 19:20:23 deraadt Exp $ */
+/* $OpenBSD: yds.c,v 1.37 2010/09/07 16:21:46 deraadt Exp $ */
/* $NetBSD: yds.c,v 1.5 2001/05/21 23:55:04 minoura Exp $ */
/*
@@ -196,7 +196,6 @@ static u_int32_t yds_get_lpfq(u_int);
static u_int32_t yds_get_lpfk(u_int);
static struct yds_dma *yds_find_dma(struct yds_softc *, void *);
-void yds_powerhook(int, void *);
int yds_init(void *sc);
void yds_attachhook(void *);
@@ -823,8 +822,6 @@ yds_attachhook(void *xsc)
/* Watch for power changes */
sc->suspend = DVACT_RESUME;
- sc->powerhook = powerhook_establish(yds_powerhook, sc);
-
yds_configure_legacy(sc);
}
@@ -1820,12 +1817,6 @@ yds_activate(struct device *self, int act)
return 0;
}
-void
-yds_powerhook(int why, void *self)
-{
- yds_activate(self, why);
-}
-
int
yds_init(sc_)
void *sc_;
diff --git a/sys/dev/pci/ydsreg.h b/sys/dev/pci/ydsreg.h
index 4515a266a1e..1fb6f05cadf 100644
--- a/sys/dev/pci/ydsreg.h
+++ b/sys/dev/pci/ydsreg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ydsreg.h,v 1.5 2004/12/20 12:29:36 deraadt Exp $ */
+/* $OpenBSD: ydsreg.h,v 1.6 2010/09/07 16:21:46 deraadt Exp $ */
/* $NetBSD$ */
/*
@@ -398,7 +398,6 @@ struct yds_softc {
/*
* Suspend/resume support
*/
- void *powerhook;
int suspend;
};
#define sc_opl_iot sc_legacy_iot