summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/autri.c
diff options
context:
space:
mode:
authorratchov <ratchov@openbsd.org>2016-12-20 15:45:29 +0000
committerratchov <ratchov@openbsd.org>2016-12-20 15:45:29 +0000
commit7f4101c5e6cfa950d8d65c008cff06dc4ecb90a9 (patch)
tree6d265947c3dc7184cdf562518d26947d57cd668f /sys/dev/pci/autri.c
parentThis commit removes bio_status() calls after a BIOCLOCATE since the (diff)
downloadwireguard-openbsd-7f4101c5e6cfa950d8d65c008cff06dc4ecb90a9.tar.xz
wireguard-openbsd-7f4101c5e6cfa950d8d65c008cff06dc4ecb90a9.zip
Simplify the activate() functions of auglx(4), autri(4), and
auvia(4). From Michael W. Bombardieri <mb at ii.net>. Thanks.
Diffstat (limited to 'sys/dev/pci/autri.c')
-rw-r--r--sys/dev/pci/autri.c13
1 files changed, 3 insertions, 10 deletions
diff --git a/sys/dev/pci/autri.c b/sys/dev/pci/autri.c
index 3ae587c7c31..51a91821811 100644
--- a/sys/dev/pci/autri.c
+++ b/sys/dev/pci/autri.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: autri.c,v 1.41 2016/09/19 06:46:44 ratchov Exp $ */
+/* $OpenBSD: autri.c,v 1.42 2016/12/20 15:45:29 ratchov Exp $ */
/*
* Copyright (c) 2001 SOMEYA Yoshihiko and KUROSAWA Takahiro.
@@ -585,19 +585,12 @@ int
autri_activate(struct device *self, int act)
{
struct autri_softc *sc = (struct autri_softc *)self;
- int rv = 0;
- switch (act) {
- case DVACT_RESUME:
+ if (act == DVACT_RESUME) {
autri_init(sc);
ac97_resume(&sc->sc_codec.host_if, sc->sc_codec.codec_if);
- rv = config_activate_children(self, act);
- break;
- default:
- rv = config_activate_children(self, act);
- break;
}
- return (rv);
+ return (config_activate_children(self, act));
}
int