summaryrefslogtreecommitdiffstats
path: root/drivers/sound/sb_ess.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-09 20:33:35 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-09 20:33:35 +0000
commit116674acc97ba75a720329996877077d988443a2 (patch)
tree6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /drivers/sound/sb_ess.c
parent71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff)
Merge with Linux 2.4.2.
Diffstat (limited to 'drivers/sound/sb_ess.c')
-rw-r--r--drivers/sound/sb_ess.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/drivers/sound/sb_ess.c b/drivers/sound/sb_ess.c
index 76f466d3b..360343312 100644
--- a/drivers/sound/sb_ess.c
+++ b/drivers/sound/sb_ess.c
@@ -186,6 +186,7 @@
*/
#include <linux/delay.h>
+#include <linux/spinlock.h>
#include "sound_config.h"
#include "sb_mixer.h"
@@ -524,10 +525,9 @@ static void ess_audio_halt_xfer(int dev)
unsigned long flags;
sb_devc *devc = audio_devs[dev]->devc;
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&devc->lock, flags);
sb_dsp_reset(devc);
- restore_flags(flags);
+ spin_unlock_irqrestore(&devc->lock, flags);
/*
* Audio 2 may still be operational! Creates awful sounds!
@@ -969,8 +969,7 @@ static unsigned int ess_identify (sb_devc * devc)
unsigned int val;
unsigned long flags;
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&devc->lock, flags);
outb(((unsigned char) (0x40 & 0xff)), MIXER_ADDR);
udelay(20);
@@ -978,7 +977,7 @@ static unsigned int ess_identify (sb_devc * devc)
udelay(20);
val |= inb(MIXER_DATA);
udelay(20);
- restore_flags(flags);
+ spin_unlock_irqrestore(&devc->lock, flags);
return val;
}
@@ -1565,8 +1564,7 @@ void ess_setmixer (sb_devc * devc, unsigned int port, unsigned int value)
printk(KERN_INFO "FKS: write mixer %x: %x\n", port, value);
#endif
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&devc->lock, flags);
if (port >= 0xa0) {
ess_write (devc, port, value);
} else {
@@ -1576,7 +1574,7 @@ printk(KERN_INFO "FKS: write mixer %x: %x\n", port, value);
outb(((unsigned char) (value & 0xff)), MIXER_DATA);
udelay(20);
};
- restore_flags(flags);
+ spin_unlock_irqrestore(&devc->lock, flags);
}
unsigned int ess_getmixer (sb_devc * devc, unsigned int port)
@@ -1584,8 +1582,7 @@ unsigned int ess_getmixer (sb_devc * devc, unsigned int port)
unsigned int val;
unsigned long flags;
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&devc->lock, flags);
if (port >= 0xa0) {
val = ess_read (devc, port);
@@ -1596,7 +1593,7 @@ unsigned int ess_getmixer (sb_devc * devc, unsigned int port)
val = inb(MIXER_DATA);
udelay(20);
}
- restore_flags(flags);
+ spin_unlock_irqrestore(&devc->lock, flags);
return val;
}