diff options
author | jhb <jhb@FreeBSD.org> | 2001-03-28 03:06:10 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-03-28 03:06:10 +0000 |
commit | 3e3a661612c8296ecbe74b7f3b09965dacbb7ff9 (patch) | |
tree | 31bcf682861c81d34d0528babee47b8a1d4c44ba /sys/dev/sound/isa/mpu.c | |
parent | dea228e37800fc07cb4619f31e155310a4bad233 (diff) | |
download | FreeBSD-src-3e3a661612c8296ecbe74b7f3b09965dacbb7ff9.zip FreeBSD-src-3e3a661612c8296ecbe74b7f3b09965dacbb7ff9.tar.gz |
Switch from save/disable/restore_intr() to critical_enter/exit().
Diffstat (limited to 'sys/dev/sound/isa/mpu.c')
-rw-r--r-- | sys/dev/sound/isa/mpu.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/dev/sound/isa/mpu.c b/sys/dev/sound/isa/mpu.c index 7653010..d417513 100644 --- a/sys/dev/sound/isa/mpu.c +++ b/sys/dev/sound/isa/mpu.c @@ -241,6 +241,7 @@ mpu_probe2(device_t dev) sc_p scp; int unit, i; intrmask_t irqp0, irqp1; + critical_t savecrit; scp = device_get_softc(dev); unit = device_get_unit(dev); @@ -266,7 +267,7 @@ mpu_probe2(device_t dev) * Idea-stolen-from: sys/isa/sio.c:sioprobe() */ - disable_intr(); + savecrit = critical_enter(); /* * See the initial irq. We have to do this now, @@ -278,7 +279,7 @@ mpu_probe2(device_t dev) /* Switch to uart mode. */ if (mpu_uartmode(scp) != 0) { - enable_intr(); + critical_exit(savecrit); printf("mpu%d: mode switching failed.\n", unit); mpu_releaseres(scp, dev); return (ENXIO); @@ -297,7 +298,7 @@ mpu_probe2(device_t dev) break; } if (irqp1 == irqp0) { - enable_intr(); + critical_exit(savecrit); printf("mpu%d: switching the mode gave no interrupt.\n", unit); mpu_releaseres(scp, dev); return (ENXIO); @@ -306,13 +307,13 @@ mpu_probe2(device_t dev) no_irq: /* Wait to see an ACK. */ if (mpu_waitack(scp) != 0) { - enable_intr(); + critical_exit(savecrit); printf("mpu%d: not acked.\n", unit); mpu_releaseres(scp, dev); return (ENXIO); } - enable_intr(); + critical_exit(savecrit); if (device_get_flags(dev) & MPU_DF_NO_IRQ) scp->irq_val = 0; |