summaryrefslogtreecommitdiffstats
path: root/sys/dev/isa/gus.c
diff options
context:
space:
mode:
authorkettenis <kettenis@openbsd.org>2018-07-30 14:19:12 +0000
committerkettenis <kettenis@openbsd.org>2018-07-30 14:19:12 +0000
commitca870d198d4665c019b9f7a842f2ce3d28caa586 (patch)
treea0465a5211f2fd487440d8fe03e0e9f77251bb04 /sys/dev/isa/gus.c
parentTweak history (diff)
downloadwireguard-openbsd-ca870d198d4665c019b9f7a842f2ce3d28caa586.tar.xz
wireguard-openbsd-ca870d198d4665c019b9f7a842f2ce3d28caa586.zip
Use the MI interrupt enable/distable API instead of the MD one on i386 and
remove the MD API. ok deraadt@
Diffstat (limited to 'sys/dev/isa/gus.c')
-rw-r--r--sys/dev/isa/gus.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/isa/gus.c b/sys/dev/isa/gus.c
index 7058000254e..67b1b88698a 100644
--- a/sys/dev/isa/gus.c
+++ b/sys/dev/isa/gus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gus.c,v 1.46 2017/05/04 15:19:01 bluhm Exp $ */
+/* $OpenBSD: gus.c,v 1.47 2018/07/30 14:19:12 kettenis Exp $ */
/* $NetBSD: gus.c,v 1.51 1998/01/25 23:48:06 mycroft Exp $ */
/*-
@@ -3198,6 +3198,7 @@ gus_subattach(struct gus_softc *sc, struct isa_attach_args *ia)
int i;
bus_space_tag_t iot;
unsigned char c,d,m;
+ u_long s;
iot = sc->sc_iot;
@@ -3244,7 +3245,7 @@ gus_subattach(struct gus_softc *sc, struct isa_attach_args *ia)
* The order of these operations is very magical.
*/
- disable_intr(); /* XXX needed? */
+ s = intr_disable(); /* XXX needed? */
bus_space_write_1(iot, sc->sc_ioh1, GUS_REG_CONTROL, GUS_REG_IRQCTL);
bus_space_write_1(iot, sc->sc_ioh1, GUS_MIX_CONTROL, m);
@@ -3274,7 +3275,7 @@ gus_subattach(struct gus_softc *sc, struct isa_attach_args *ia)
(m | GUSMASK_LATCHES) & ~(GUSMASK_LINE_OUT|GUSMASK_LINE_IN));
bus_space_write_1(iot, sc->sc_ioh2, GUS_VOICE_SELECT, 0x00);
- enable_intr();
+ intr_restore(s);
sc->sc_mixcontrol =
(m | GUSMASK_LATCHES) & ~(GUSMASK_LINE_OUT|GUSMASK_LINE_IN);