aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/ad1848
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:33:08 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:25:03 -0500
commit8b7547f95cbe8a5940df62ed730646fdfcba5fda (patch)
tree704102a2b9eaef96cf8b96c46e9e48855de64ea3 /sound/isa/ad1848
parentef9f0a42db987e7e2df72289fb4522d24027786b (diff)
[ALSA] semaphore -> mutex (ISA 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/isa/ad1848')
-rw-r--r--sound/isa/ad1848/ad1848_lib.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/isa/ad1848/ad1848_lib.c b/sound/isa/ad1848/ad1848_lib.c
index b78530d7ea90..d4b0e580557e 100644
--- a/sound/isa/ad1848/ad1848_lib.c
+++ b/sound/isa/ad1848/ad1848_lib.c
@@ -387,9 +387,9 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode)
387{ 387{
388 unsigned long flags; 388 unsigned long flags;
389 389
390 down(&chip->open_mutex); 390 mutex_lock(&chip->open_mutex);
391 if (chip->mode & AD1848_MODE_OPEN) { 391 if (chip->mode & AD1848_MODE_OPEN) {
392 up(&chip->open_mutex); 392 mutex_unlock(&chip->open_mutex);
393 return -EAGAIN; 393 return -EAGAIN;
394 } 394 }
395 snd_ad1848_mce_down(chip); 395 snd_ad1848_mce_down(chip);
@@ -432,7 +432,7 @@ static int snd_ad1848_open(struct snd_ad1848 *chip, unsigned int mode)
432 spin_unlock_irqrestore(&chip->reg_lock, flags); 432 spin_unlock_irqrestore(&chip->reg_lock, flags);
433 433
434 chip->mode = mode; 434 chip->mode = mode;
435 up(&chip->open_mutex); 435 mutex_unlock(&chip->open_mutex);
436 436
437 return 0; 437 return 0;
438} 438}
@@ -441,9 +441,9 @@ static void snd_ad1848_close(struct snd_ad1848 *chip)
441{ 441{
442 unsigned long flags; 442 unsigned long flags;
443 443
444 down(&chip->open_mutex); 444 mutex_lock(&chip->open_mutex);
445 if (!chip->mode) { 445 if (!chip->mode) {
446 up(&chip->open_mutex); 446 mutex_unlock(&chip->open_mutex);
447 return; 447 return;
448 } 448 }
449 /* disable IRQ */ 449 /* disable IRQ */
@@ -471,7 +471,7 @@ static void snd_ad1848_close(struct snd_ad1848 *chip)
471 spin_unlock_irqrestore(&chip->reg_lock, flags); 471 spin_unlock_irqrestore(&chip->reg_lock, flags);
472 472
473 chip->mode = 0; 473 chip->mode = 0;
474 up(&chip->open_mutex); 474 mutex_unlock(&chip->open_mutex);
475} 475}
476 476
477/* 477/*
@@ -889,7 +889,7 @@ int snd_ad1848_create(struct snd_card *card,
889 if (chip == NULL) 889 if (chip == NULL)
890 return -ENOMEM; 890 return -ENOMEM;
891 spin_lock_init(&chip->reg_lock); 891 spin_lock_init(&chip->reg_lock);
892 init_MUTEX(&chip->open_mutex); 892 mutex_init(&chip->open_mutex);
893 chip->card = card; 893 chip->card = card;
894 chip->port = port; 894 chip->port = port;
895 chip->irq = -1; 895 chip->irq = -1;