aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/opl3/opl3_midi.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/drivers/opl3/opl3_midi.c')
-rw-r--r--sound/drivers/opl3/opl3_midi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/drivers/opl3/opl3_midi.c b/sound/drivers/opl3/opl3_midi.c
index 48c480e050ce..1b6f227af370 100644
--- a/sound/drivers/opl3/opl3_midi.c
+++ b/sound/drivers/opl3/opl3_midi.c
@@ -238,10 +238,11 @@ void snd_opl3_timer_func(unsigned long data)
238{ 238{
239 239
240 struct snd_opl3 *opl3 = (struct snd_opl3 *)data; 240 struct snd_opl3 *opl3 = (struct snd_opl3 *)data;
241 unsigned long flags;
241 int again = 0; 242 int again = 0;
242 int i; 243 int i;
243 244
244 spin_lock(&opl3->sys_timer_lock); 245 spin_lock_irqsave(&opl3->sys_timer_lock, flags);
245 for (i = 0; i < opl3->max_voices; i++) { 246 for (i = 0; i < opl3->max_voices; i++) {
246 struct snd_opl3_voice *vp = &opl3->voices[i]; 247 struct snd_opl3_voice *vp = &opl3->voices[i];
247 if (vp->state > 0 && vp->note_off_check) { 248 if (vp->state > 0 && vp->note_off_check) {
@@ -257,7 +258,7 @@ void snd_opl3_timer_func(unsigned long data)
257 } else { 258 } else {
258 opl3->sys_timer_status = 0; 259 opl3->sys_timer_status = 0;
259 } 260 }
260 spin_unlock(&opl3->sys_timer_lock); 261 spin_unlock_irqrestore(&opl3->sys_timer_lock, flags);
261} 262}
262 263
263/* 264/*