diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-08-27 18:50:58 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2010-08-27 18:50:58 +0000 |
commit | c959724ca9542e8025c1fb52716e4ed6b15748a6 (patch) | |
tree | e33259cad5104cb869be745813e2f60160a77cc7 /sys/dev/pci/esa.c | |
parent | feef32ec1c77b0779b4ab487d2e91fe77f81571a (diff) |
Since the changes in neo(4) work, it is very likely that the exact same
mechnical changes work in these drivers too. Testing can occur after
this commit.
Diffstat (limited to 'sys/dev/pci/esa.c')
-rw-r--r-- | sys/dev/pci/esa.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/sys/dev/pci/esa.c b/sys/dev/pci/esa.c index 95ea0753502..eb33bda86fb 100644 --- a/sys/dev/pci/esa.c +++ b/sys/dev/pci/esa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: esa.c,v 1.20 2010/08/27 04:09:19 deraadt Exp $ */ +/* $OpenBSD: esa.c,v 1.21 2010/08/27 18:50:57 deraadt Exp $ */ /* $NetBSD: esa.c,v 1.12 2002/03/24 14:17:35 jmcneill Exp $ */ /* @@ -102,6 +102,7 @@ struct audio_device esa_device = { int esa_match(struct device *, void *, void *); void esa_attach(struct device *, struct device *, void *); int esa_detach(struct device *, int); +int esa_activate(struct device *, int); /* audio(9) functions */ int esa_open(void *, int); @@ -219,7 +220,7 @@ struct cfdriver esa_cd = { struct cfattach esa_ca = { sizeof(struct esa_softc), esa_match, esa_attach, - esa_detach, /*esa_activate*/ NULL + esa_detach, esa_activate }; /* @@ -1604,20 +1605,27 @@ esa_remove_list(struct esa_voice *vc, struct esa_list *el, int index) return; } -void -esa_powerhook(int why, void *hdl) +int +esa_activate(struct device *self, int act) { - struct esa_softc *sc = (struct esa_softc *)hdl; + struct esa_softc *sc = (struct esa_softc *)self; - switch (why) { - case PWR_SUSPEND: + switch (act) { + case DVACT_SUSPEND: esa_suspend(sc); break; - case PWR_RESUME: + case DVACT_RESUME: esa_resume(sc); (sc->codec_if->vtbl->restore_ports)(sc->codec_if); break; } + return 0; +} + +void +esa_powerhook(int why, void *hdl) +{ + esa_activate(hdl, why); } int |