diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-16 18:33:08 +0300 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 12:25:03 +0300 |
commit | 8b7547f95cbe8a5940df62ed730646fdfcba5fda (patch) | |
tree | 704102a2b9eaef96cf8b96c46e9e48855de64ea3 /sound/isa/gus | |
parent | ef9f0a42db987e7e2df72289fb4522d24027786b (diff) | |
download | linux-8b7547f95cbe8a5940df62ed730646fdfcba5fda.tar.xz |
[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/gus')
-rw-r--r-- | sound/isa/gus/gus_dma.c | 10 | ||||
-rw-r--r-- | sound/isa/gus/gus_main.c | 2 | ||||
-rw-r--r-- | sound/isa/gus/gus_mem.c | 14 | ||||
-rw-r--r-- | sound/isa/gus/gus_synth.c | 14 |
4 files changed, 20 insertions, 20 deletions
diff --git a/sound/isa/gus/gus_dma.c b/sound/isa/gus/gus_dma.c index 930f4bc56f34..44ee5d3674a1 100644 --- a/sound/isa/gus/gus_dma.c +++ b/sound/isa/gus/gus_dma.c @@ -149,10 +149,10 @@ static void snd_gf1_dma_interrupt(struct snd_gus_card * gus) int snd_gf1_dma_init(struct snd_gus_card * gus) { - down(&gus->dma_mutex); + mutex_lock(&gus->dma_mutex); gus->gf1.dma_shared++; if (gus->gf1.dma_shared > 1) { - up(&gus->dma_mutex); + mutex_unlock(&gus->dma_mutex); return 0; } gus->gf1.interrupt_handler_dma_write = snd_gf1_dma_interrupt; @@ -160,7 +160,7 @@ int snd_gf1_dma_init(struct snd_gus_card * gus) gus->gf1.dma_data_pcm_last = gus->gf1.dma_data_synth = gus->gf1.dma_data_synth_last = NULL; - up(&gus->dma_mutex); + mutex_unlock(&gus->dma_mutex); return 0; } @@ -168,7 +168,7 @@ int snd_gf1_dma_done(struct snd_gus_card * gus) { struct snd_gf1_dma_block *block; - down(&gus->dma_mutex); + mutex_lock(&gus->dma_mutex); gus->gf1.dma_shared--; if (!gus->gf1.dma_shared) { snd_dma_disable(gus->gf1.dma1); @@ -185,7 +185,7 @@ int snd_gf1_dma_done(struct snd_gus_card * gus) gus->gf1.dma_data_pcm_last = gus->gf1.dma_data_synth_last = NULL; } - up(&gus->dma_mutex); + mutex_unlock(&gus->dma_mutex); return 0; } diff --git a/sound/isa/gus/gus_main.c b/sound/isa/gus/gus_main.c index 6d15b3d18a87..53eeaf37007d 100644 --- a/sound/isa/gus/gus_main.c +++ b/sound/isa/gus/gus_main.c @@ -225,7 +225,7 @@ int snd_gus_create(struct snd_card *card, spin_lock_init(&gus->dma_lock); spin_lock_init(&gus->pcm_volume_level_lock); spin_lock_init(&gus->uart_cmd_lock); - init_MUTEX(&gus->dma_mutex); + mutex_init(&gus->dma_mutex); if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, gus, &ops)) < 0) { snd_gus_free(gus); return err; diff --git a/sound/isa/gus/gus_mem.c b/sound/isa/gus/gus_mem.c index e8bdb860a19f..3c0d27aa08b3 100644 --- a/sound/isa/gus/gus_mem.c +++ b/sound/isa/gus/gus_mem.c @@ -34,9 +34,9 @@ static void snd_gf1_mem_info_read(struct snd_info_entry *entry, void snd_gf1_mem_lock(struct snd_gf1_mem * alloc, int xup) { if (!xup) { - down(&alloc->memory_mutex); + mutex_lock(&alloc->memory_mutex); } else { - up(&alloc->memory_mutex); + mutex_unlock(&alloc->memory_mutex); } } @@ -59,7 +59,7 @@ static struct snd_gf1_mem_block *snd_gf1_mem_xalloc(struct snd_gf1_mem * alloc, alloc->first = nblock; else nblock->prev->next = nblock; - up(&alloc->memory_mutex); + mutex_unlock(&alloc->memory_mutex); return NULL; } pblock = pblock->next; @@ -80,7 +80,7 @@ int snd_gf1_mem_xfree(struct snd_gf1_mem * alloc, struct snd_gf1_mem_block * blo { if (block->share) { /* ok.. shared block */ block->share--; - up(&alloc->memory_mutex); + mutex_unlock(&alloc->memory_mutex); return 0; } if (alloc->first == block) { @@ -244,7 +244,7 @@ int snd_gf1_mem_init(struct snd_gus_card * gus) #endif alloc = &gus->gf1.mem_alloc; - init_MUTEX(&alloc->memory_mutex); + mutex_init(&alloc->memory_mutex); alloc->first = alloc->last = NULL; if (!gus->gf1.memory) return 0; @@ -299,7 +299,7 @@ static void snd_gf1_mem_info_read(struct snd_info_entry *entry, gus = entry->private_data; alloc = &gus->gf1.mem_alloc; - down(&alloc->memory_mutex); + mutex_lock(&alloc->memory_mutex); snd_iprintf(buffer, "8-bit banks : \n "); for (i = 0; i < 4; i++) snd_iprintf(buffer, "0x%06x (%04ik)%s", alloc->banks_8[i].address, alloc->banks_8[i].size >> 10, i + 1 < 4 ? "," : ""); @@ -343,7 +343,7 @@ static void snd_gf1_mem_info_read(struct snd_info_entry *entry, } snd_iprintf(buffer, " Total: memory = %i, used = %i, free = %i\n", total, used, total - used); - up(&alloc->memory_mutex); + mutex_unlock(&alloc->memory_mutex); #if 0 ultra_iprintf(buffer, " Verify: free = %i, max 8-bit block = %i, max 16-bit block = %i\n", ultra_memory_free_size(card, &card->gf1.mem_alloc), diff --git a/sound/isa/gus/gus_synth.c b/sound/isa/gus/gus_synth.c index 85a1b051f09a..2767cc187ae3 100644 --- a/sound/isa/gus/gus_synth.c +++ b/sound/isa/gus/gus_synth.c @@ -55,9 +55,9 @@ static int snd_gus_synth_use(void *private_data, struct snd_seq_port_subscribe * if (info->voices > 32) return -EINVAL; - down(&gus->register_mutex); + mutex_lock(&gus->register_mutex); if (!snd_gus_use_inc(gus)) { - up(&gus->register_mutex); + mutex_unlock(&gus->register_mutex); return -EFAULT; } for (idx = 0; idx < info->voices; idx++) { @@ -65,12 +65,12 @@ static int snd_gus_synth_use(void *private_data, struct snd_seq_port_subscribe * if (voice == NULL) { snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port); snd_gus_use_dec(gus); - up(&gus->register_mutex); + mutex_unlock(&gus->register_mutex); return -EBUSY; } voice->index = idx; } - up(&gus->register_mutex); + mutex_unlock(&gus->register_mutex); return 0; } @@ -79,10 +79,10 @@ static int snd_gus_synth_unuse(void *private_data, struct snd_seq_port_subscribe struct snd_gus_port * port = private_data; struct snd_gus_card * gus = port->gus; - down(&gus->register_mutex); + mutex_lock(&gus->register_mutex); snd_gus_synth_free_voices(gus, info->sender.client, info->sender.port); snd_gus_use_dec(gus); - up(&gus->register_mutex); + mutex_unlock(&gus->register_mutex); return 0; } @@ -223,7 +223,7 @@ static int snd_gus_synth_new_device(struct snd_seq_device *dev) if (gus == NULL) return -EINVAL; - init_MUTEX(&gus->register_mutex); + mutex_init(&gus->register_mutex); gus->gf1.seq_client = -1; /* allocate new client */ |