summaryrefslogtreecommitdiff
path: root/sys/dev/pci/azalia.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/azalia.c')
-rw-r--r--sys/dev/pci/azalia.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/sys/dev/pci/azalia.c b/sys/dev/pci/azalia.c
index 9438836c903..d4166acf547 100644
--- a/sys/dev/pci/azalia.c
+++ b/sys/dev/pci/azalia.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: azalia.c,v 1.183 2010/08/08 05:25:30 jakemsr Exp $ */
+/* $OpenBSD: azalia.c,v 1.184 2010/08/31 06:12:28 deraadt Exp $ */
/* $NetBSD: azalia.c,v 1.20 2006/05/07 08:31:44 kent Exp $ */
/*-
@@ -536,26 +536,24 @@ err_exit:
int
azalia_pci_activate(struct device *self, int act)
{
- azalia_t *sc;
- int ret;
+ azalia_t *sc = (azalia_t*)self;
+ int rv = 0;
- sc = (azalia_t*)self;
- ret = 0;
switch (act) {
case DVACT_ACTIVATE:
- return ret;
- case DVACT_DEACTIVATE:
- if (sc->audiodev != NULL)
- ret = config_deactivate(sc->audiodev);
- return ret;
+ break;
case DVACT_SUSPEND:
azalia_suspend(sc);
- return ret;
+ break;
case DVACT_RESUME:
azalia_resume(sc);
- return ret;
+ break;
+ case DVACT_DEACTIVATE:
+ if (sc->audiodev != NULL)
+ rv = config_deactivate(sc->audiodev);
+ break;
}
- return EOPNOTSUPP;
+ return (rv);
}
int