diff options
author | 2014-09-24 08:35:12 +0000 | |
---|---|---|
committer | 2014-09-24 08:35:12 +0000 | |
commit | cf15a1ac0a929bd2e42046ed8daac54f2c3e233e (patch) | |
tree | c4137d05bf201fe1f4157b1762844a3ab293e38f | |
parent | jmatthew@ found another case of me getting the number of args wrong (diff) | |
download | wireguard-openbsd-cf15a1ac0a929bd2e42046ed8daac54f2c3e233e.tar.xz wireguard-openbsd-cf15a1ac0a929bd2e42046ed8daac54f2c3e233e.zip |
Kill two generic DVACT_DEACTIVATE handlers since this event is now
autoconf(9)ally passed to the children of a device.
ok ratchov@
-rw-r--r-- | sys/dev/pci/auich.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/azalia.c | 14 |
2 files changed, 5 insertions, 18 deletions
diff --git a/sys/dev/pci/auich.c b/sys/dev/pci/auich.c index 691d3171b17..a5f45f15ba1 100644 --- a/sys/dev/pci/auich.c +++ b/sys/dev/pci/auich.c @@ -1,4 +1,4 @@ -/* $OpenBSD: auich.c,v 1.101 2014/07/12 18:48:51 tedu Exp $ */ +/* $OpenBSD: auich.c,v 1.102 2014/09/24 08:35:12 mpi Exp $ */ /* * Copyright (c) 2000,2001 Michael Shalayeff @@ -174,7 +174,6 @@ struct auich_softc { void *sc_ih; audio_device_t sc_audev; - struct device *audiodev; pcireg_t pci_id; bus_space_tag_t iot; @@ -543,7 +542,7 @@ auich_attach(struct device *parent, struct device *self, void *aux) } sc->codec_if->vtbl->unlock(sc->codec_if); - sc->audiodev = audio_attach_mi(&auich_hw_if, sc, &sc->sc_dev); + audio_attach_mi(&auich_hw_if, sc, &sc->sc_dev); /* Watch for power changes */ sc->suspend = DVACT_RESUME; @@ -562,10 +561,6 @@ auich_activate(struct device *self, int act) auich_resume(sc); rv = config_activate_children(self, act); break; - case DVACT_DEACTIVATE: - if (sc->audiodev != NULL) - rv = config_deactivate(sc->audiodev); - break; default: rv = config_activate_children(self, act); break; diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c index de33d09ee47..c7bb7d8fce6 100644 --- a/sys/dev/pci/azalia.c +++ b/sys/dev/pci/azalia.c @@ -1,4 +1,4 @@ -/* $OpenBSD: azalia.c,v 1.216 2014/08/13 07:45:37 jsg Exp $ */ +/* $OpenBSD: azalia.c,v 1.217 2014/09/24 08:35:12 mpi Exp $ */ /* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */ /*- @@ -145,7 +145,6 @@ typedef struct { typedef struct azalia_t { struct device dev; - struct device *audiodev; pci_chipset_tag_t pc; pcitag_t tag; @@ -551,7 +550,7 @@ azalia_pci_attach(struct device *parent, struct device *self, void *aux) if (azalia_init_streams(sc)) goto err_exit; - sc->audiodev = audio_attach_mi(&azalia_hw_if, sc, &sc->dev); + audio_attach_mi(&azalia_hw_if, sc, &sc->dev); return; @@ -577,10 +576,6 @@ azalia_pci_activate(struct device *self, int act) azalia_resume(sc); rv = config_activate_children(self, act); break; - case DVACT_DEACTIVATE: - if (sc->audiodev != NULL) - rv = config_deactivate(sc->audiodev); - break; default: rv = config_activate_children(self, act); break; @@ -605,10 +600,7 @@ azalia_pci_detach(struct device *self, int flags) if (az->detached > 1) return 0; - if (az->audiodev != NULL) { - config_detach(az->audiodev, flags); - az->audiodev = NULL; - } + config_detach_children(self, flags); /* disable unsolicited responses if soft detaching */ if (az->detached == 1) { |