aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_queue.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:29:08 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:24:50 -0500
commit1a60d4c5a0c4028559585a74e48593b16e1ca9b2 (patch)
treef03f8dfcd554f8ebbb295522dc46dfe4d110a484 /sound/core/seq/seq_queue.c
parentf0283f45a04d5cf31512e5e390a38504d97e7a97 (diff)
[ALSA] semaphore -> mutex (core part)
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/seq_queue.c')
-rw-r--r--sound/core/seq/seq_queue.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/core/seq/seq_queue.c b/sound/core/seq/seq_queue.c
index 9cf20f045542..9b87bb0c7f33 100644
--- a/sound/core/seq/seq_queue.c
+++ b/sound/core/seq/seq_queue.c
@@ -119,7 +119,7 @@ static struct snd_seq_queue *queue_new(int owner, int locked)
119 119
120 spin_lock_init(&q->owner_lock); 120 spin_lock_init(&q->owner_lock);
121 spin_lock_init(&q->check_lock); 121 spin_lock_init(&q->check_lock);
122 init_MUTEX(&q->timer_mutex); 122 mutex_init(&q->timer_mutex);
123 snd_use_lock_init(&q->use_lock); 123 snd_use_lock_init(&q->use_lock);
124 q->queue = -1; 124 q->queue = -1;
125 125
@@ -516,7 +516,7 @@ int snd_seq_queue_use(int queueid, int client, int use)
516 queue = queueptr(queueid); 516 queue = queueptr(queueid);
517 if (queue == NULL) 517 if (queue == NULL)
518 return -EINVAL; 518 return -EINVAL;
519 down(&queue->timer_mutex); 519 mutex_lock(&queue->timer_mutex);
520 if (use) { 520 if (use) {
521 if (!test_and_set_bit(client, queue->clients_bitmap)) 521 if (!test_and_set_bit(client, queue->clients_bitmap))
522 queue->clients++; 522 queue->clients++;
@@ -531,7 +531,7 @@ int snd_seq_queue_use(int queueid, int client, int use)
531 } else { 531 } else {
532 snd_seq_timer_close(queue); 532 snd_seq_timer_close(queue);
533 } 533 }
534 up(&queue->timer_mutex); 534 mutex_unlock(&queue->timer_mutex);
535 queuefree(queue); 535 queuefree(queue);
536 return 0; 536 return 0;
537} 537}