aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/gus/gus_synth.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 16:33:08 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:25:03 +0100
commit8b7547f95cbe8a5940df62ed730646fdfcba5fda (patch)
tree704102a2b9eaef96cf8b96c46e9e48855de64ea3 /sound/isa/gus/gus_synth.c
parent[ALSA] semaphore -> mutex (driver part) (diff)
downloadlinux-dev-8b7547f95cbe8a5940df62ed730646fdfcba5fda.tar.xz
linux-dev-8b7547f95cbe8a5940df62ed730646fdfcba5fda.zip
[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/gus_synth.c')
-rw-r--r--sound/isa/gus/gus_synth.c14
1 files changed, 7 insertions, 7 deletions
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 */