diff options
Diffstat (limited to 'sound/synth/emux')
-rw-r--r-- | sound/synth/emux/emux.c | 2 | ||||
-rw-r--r-- | sound/synth/emux/emux_oss.c | 12 | ||||
-rw-r--r-- | sound/synth/emux/emux_proc.c | 8 | ||||
-rw-r--r-- | sound/synth/emux/emux_seq.c | 12 | ||||
-rw-r--r-- | sound/synth/emux/soundfont.c | 6 |
5 files changed, 20 insertions, 20 deletions
diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c index 7c8e328fae6..fc733bbf448 100644 --- a/sound/synth/emux/emux.c +++ b/sound/synth/emux/emux.c @@ -45,7 +45,7 @@ int snd_emux_new(struct snd_emux **remu) return -ENOMEM; spin_lock_init(&emu->voice_lock); - init_MUTEX(&emu->register_mutex); + mutex_init(&emu->register_mutex); emu->client = -1; #ifdef CONFIG_SND_SEQUENCER_OSS diff --git a/sound/synth/emux/emux_oss.c b/sound/synth/emux/emux_oss.c index dfbfcfbe5dd..3436816727c 100644 --- a/sound/synth/emux/emux_oss.c +++ b/sound/synth/emux/emux_oss.c @@ -117,10 +117,10 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure) emu = closure; snd_assert(arg != NULL && emu != NULL, return -ENXIO); - down(&emu->register_mutex); + mutex_lock(&emu->register_mutex); if (!snd_emux_inc_count(emu)) { - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); return -EFAULT; } @@ -134,7 +134,7 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure) if (p == NULL) { snd_printk("can't create port\n"); snd_emux_dec_count(emu); - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); return -ENOMEM; } @@ -148,7 +148,7 @@ snd_emux_open_seq_oss(struct snd_seq_oss_arg *arg, void *closure) snd_emux_reset_port(p); - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); return 0; } @@ -191,13 +191,13 @@ snd_emux_close_seq_oss(struct snd_seq_oss_arg *arg) emu = p->emu; snd_assert(emu != NULL, return -ENXIO); - down(&emu->register_mutex); + mutex_lock(&emu->register_mutex); snd_emux_sounds_off_all(p); snd_soundfont_close_check(emu->sflist, SF_CLIENT_NO(p->chset.port)); snd_seq_event_port_detach(p->chset.client, p->chset.port); snd_emux_dec_count(emu); - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); return 0; } diff --git a/sound/synth/emux/emux_proc.c b/sound/synth/emux/emux_proc.c index a70a179f694..1ba68ce3027 100644 --- a/sound/synth/emux/emux_proc.c +++ b/sound/synth/emux/emux_proc.c @@ -37,7 +37,7 @@ snd_emux_proc_info_read(struct snd_info_entry *entry, int i; emu = entry->private_data; - down(&emu->register_mutex); + mutex_lock(&emu->register_mutex); if (emu->name) snd_iprintf(buf, "Device: %s\n", emu->name); snd_iprintf(buf, "Ports: %d\n", emu->num_ports); @@ -56,13 +56,13 @@ snd_emux_proc_info_read(struct snd_info_entry *entry, snd_iprintf(buf, "Memory Size: 0\n"); } if (emu->sflist) { - down(&emu->sflist->presets_mutex); + mutex_lock(&emu->sflist->presets_mutex); snd_iprintf(buf, "SoundFonts: %d\n", emu->sflist->fonts_size); snd_iprintf(buf, "Instruments: %d\n", emu->sflist->zone_counter); snd_iprintf(buf, "Samples: %d\n", emu->sflist->sample_counter); snd_iprintf(buf, "Locked Instruments: %d\n", emu->sflist->zone_locked); snd_iprintf(buf, "Locked Samples: %d\n", emu->sflist->sample_locked); - up(&emu->sflist->presets_mutex); + mutex_unlock(&emu->sflist->presets_mutex); } #if 0 /* debug */ if (emu->voices[0].state != SNDRV_EMUX_ST_OFF && emu->voices[0].ch >= 0) { @@ -103,7 +103,7 @@ snd_emux_proc_info_read(struct snd_info_entry *entry, snd_iprintf(buf, "sample_mode=%x, rate=%x\n", vp->reg.sample_mode, vp->reg.rate_offset); } #endif - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); } diff --git a/sound/synth/emux/emux_seq.c b/sound/synth/emux/emux_seq.c index 1a973d7a90f..8f00f07701c 100644 --- a/sound/synth/emux/emux_seq.c +++ b/sound/synth/emux/emux_seq.c @@ -123,12 +123,12 @@ snd_emux_detach_seq(struct snd_emux *emu) if (emu->voices) snd_emux_terminate_all(emu); - down(&emu->register_mutex); + mutex_lock(&emu->register_mutex); if (emu->client >= 0) { snd_seq_delete_kernel_client(emu->client); emu->client = -1; } - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); } @@ -311,10 +311,10 @@ snd_emux_use(void *private_data, struct snd_seq_port_subscribe *info) emu = p->emu; snd_assert(emu != NULL, return -EINVAL); - down(&emu->register_mutex); + mutex_lock(&emu->register_mutex); snd_emux_init_port(p); snd_emux_inc_count(emu); - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); return 0; } @@ -332,10 +332,10 @@ snd_emux_unuse(void *private_data, struct snd_seq_port_subscribe *info) emu = p->emu; snd_assert(emu != NULL, return -EINVAL); - down(&emu->register_mutex); + mutex_lock(&emu->register_mutex); snd_emux_sounds_off_all(p); snd_emux_dec_count(emu); - up(&emu->register_mutex); + mutex_unlock(&emu->register_mutex); return 0; } diff --git a/sound/synth/emux/soundfont.c b/sound/synth/emux/soundfont.c index 4c5754d4a2e..32c27162dfb 100644 --- a/sound/synth/emux/soundfont.c +++ b/sound/synth/emux/soundfont.c @@ -79,7 +79,7 @@ static void lock_preset(struct snd_sf_list *sflist) { unsigned long flags; - down(&sflist->presets_mutex); + mutex_lock(&sflist->presets_mutex); spin_lock_irqsave(&sflist->lock, flags); sflist->presets_locked = 1; spin_unlock_irqrestore(&sflist->lock, flags); @@ -96,7 +96,7 @@ unlock_preset(struct snd_sf_list *sflist) spin_lock_irqsave(&sflist->lock, flags); sflist->presets_locked = 0; spin_unlock_irqrestore(&sflist->lock, flags); - up(&sflist->presets_mutex); + mutex_unlock(&sflist->presets_mutex); } @@ -1390,7 +1390,7 @@ snd_sf_new(struct snd_sf_callback *callback, struct snd_util_memhdr *hdr) if ((sflist = kzalloc(sizeof(*sflist), GFP_KERNEL)) == NULL) return NULL; - init_MUTEX(&sflist->presets_mutex); + mutex_init(&sflist->presets_mutex); spin_lock_init(&sflist->lock); sflist->memhdr = hdr; |