aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_instr.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/seq/seq_instr.c')
-rw-r--r--sound/core/seq/seq_instr.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c
index 5efe6523a589..9a6fd56c9109 100644
--- a/sound/core/seq/seq_instr.c
+++ b/sound/core/seq/seq_instr.c
@@ -1,6 +1,6 @@
1/* 1/*
2 * Generic Instrument routines for ALSA sequencer 2 * Generic Instrument routines for ALSA sequencer
3 * Copyright (c) 1999 by Jaroslav Kysela <perex@suse.cz> 3 * Copyright (c) 1999 by Jaroslav Kysela <perex@perex.cz>
4 * 4 *
5 * This program is free software; you can redistribute it and/or modify 5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by 6 * it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@
26#include <sound/seq_instr.h> 26#include <sound/seq_instr.h>
27#include <sound/initval.h> 27#include <sound/initval.h>
28 28
29MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>"); 29MODULE_AUTHOR("Jaroslav Kysela <perex@perex.cz>");
30MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer instrument library."); 30MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer instrument library.");
31MODULE_LICENSE("GPL"); 31MODULE_LICENSE("GPL");
32 32
@@ -109,7 +109,7 @@ void snd_seq_instr_list_free(struct snd_seq_kinstr_list **list_ptr)
109 spin_lock_irqsave(&list->lock, flags); 109 spin_lock_irqsave(&list->lock, flags);
110 while (instr->use) { 110 while (instr->use) {
111 spin_unlock_irqrestore(&list->lock, flags); 111 spin_unlock_irqrestore(&list->lock, flags);
112 schedule_timeout(1); 112 schedule_timeout_uninterruptible(1);
113 spin_lock_irqsave(&list->lock, flags); 113 spin_lock_irqsave(&list->lock, flags);
114 } 114 }
115 spin_unlock_irqrestore(&list->lock, flags); 115 spin_unlock_irqrestore(&list->lock, flags);
@@ -198,8 +198,10 @@ int snd_seq_instr_list_free_cond(struct snd_seq_kinstr_list *list,
198 while (flist) { 198 while (flist) {
199 instr = flist; 199 instr = flist;
200 flist = instr->next; 200 flist = instr->next;
201 while (instr->use) 201 while (instr->use) {
202 schedule_timeout(1); 202 schedule_timeout_uninterruptible(1);
203 barrier();
204 }
203 if (snd_seq_instr_free(instr, atomic)<0) 205 if (snd_seq_instr_free(instr, atomic)<0)
204 snd_printk(KERN_WARNING "instrument free problem\n"); 206 snd_printk(KERN_WARNING "instrument free problem\n");
205 instr = next; 207 instr = next;
@@ -555,7 +557,7 @@ static int instr_free(struct snd_seq_kinstr_ops *ops,
555 SNDRV_SEQ_INSTR_NOTIFY_REMOVE); 557 SNDRV_SEQ_INSTR_NOTIFY_REMOVE);
556 while (instr->use) { 558 while (instr->use) {
557 spin_unlock_irqrestore(&list->lock, flags); 559 spin_unlock_irqrestore(&list->lock, flags);
558 schedule_timeout(1); 560 schedule_timeout_uninterruptible(1);
559 spin_lock_irqsave(&list->lock, flags); 561 spin_lock_irqsave(&list->lock, flags);
560 } 562 }
561 spin_unlock_irqrestore(&list->lock, flags); 563 spin_unlock_irqrestore(&list->lock, flags);