diff options
Diffstat (limited to 'sound/drivers/opl4')
-rw-r--r-- | sound/drivers/opl4/opl4_lib.c | 2 | ||||
-rw-r--r-- | sound/drivers/opl4/opl4_local.h | 2 | ||||
-rw-r--r-- | sound/drivers/opl4/opl4_proc.c | 10 | ||||
-rw-r--r-- | sound/drivers/opl4/opl4_seq.c | 12 |
4 files changed, 13 insertions, 13 deletions
diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index ddfc10d04be2..4bc860ae02de 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c @@ -214,7 +214,7 @@ int snd_opl4_create(struct snd_card *card, opl4->fm_port = fm_port; opl4->pcm_port = pcm_port; spin_lock_init(&opl4->reg_lock); - init_MUTEX(&opl4->access_mutex); + mutex_init(&opl4->access_mutex); err = snd_opl4_detect(opl4); if (err < 0) { diff --git a/sound/drivers/opl4/opl4_local.h b/sound/drivers/opl4/opl4_local.h index 7e088a4a2f4c..470e5a758a02 100644 --- a/sound/drivers/opl4/opl4_local.h +++ b/sound/drivers/opl4/opl4_local.h @@ -182,7 +182,7 @@ struct snd_opl4 { struct snd_info_entry *proc_entry; int memory_access; #endif - struct semaphore access_mutex; + struct mutex access_mutex; #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) int used; diff --git a/sound/drivers/opl4/opl4_proc.c b/sound/drivers/opl4/opl4_proc.c index f4b4e74fcc18..e552ec34166f 100644 --- a/sound/drivers/opl4/opl4_proc.c +++ b/sound/drivers/opl4/opl4_proc.c @@ -28,13 +28,13 @@ static int snd_opl4_mem_proc_open(struct snd_info_entry *entry, { struct snd_opl4 *opl4 = entry->private_data; - down(&opl4->access_mutex); + mutex_lock(&opl4->access_mutex); if (opl4->memory_access) { - up(&opl4->access_mutex); + mutex_unlock(&opl4->access_mutex); return -EBUSY; } opl4->memory_access++; - up(&opl4->access_mutex); + mutex_unlock(&opl4->access_mutex); return 0; } @@ -43,9 +43,9 @@ static int snd_opl4_mem_proc_release(struct snd_info_entry *entry, { struct snd_opl4 *opl4 = entry->private_data; - down(&opl4->access_mutex); + mutex_lock(&opl4->access_mutex); opl4->memory_access--; - up(&opl4->access_mutex); + mutex_unlock(&opl4->access_mutex); return 0; } diff --git a/sound/drivers/opl4/opl4_seq.c b/sound/drivers/opl4/opl4_seq.c index e3480326e735..dc0dcdc6c313 100644 --- a/sound/drivers/opl4/opl4_seq.c +++ b/sound/drivers/opl4/opl4_seq.c @@ -62,10 +62,10 @@ static int snd_opl4_seq_use(void *private_data, struct snd_seq_port_subscribe *i struct snd_opl4 *opl4 = private_data; int err; - down(&opl4->access_mutex); + mutex_lock(&opl4->access_mutex); if (opl4->used) { - up(&opl4->access_mutex); + mutex_unlock(&opl4->access_mutex); return -EBUSY; } opl4->used++; @@ -73,12 +73,12 @@ static int snd_opl4_seq_use(void *private_data, struct snd_seq_port_subscribe *i if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) { err = snd_opl4_seq_use_inc(opl4); if (err < 0) { - up(&opl4->access_mutex); + mutex_unlock(&opl4->access_mutex); return err; } } - up(&opl4->access_mutex); + mutex_unlock(&opl4->access_mutex); snd_opl4_synth_reset(opl4); return 0; @@ -90,9 +90,9 @@ static int snd_opl4_seq_unuse(void *private_data, struct snd_seq_port_subscribe snd_opl4_synth_shutdown(opl4); - down(&opl4->access_mutex); + mutex_lock(&opl4->access_mutex); opl4->used--; - up(&opl4->access_mutex); + mutex_unlock(&opl4->access_mutex); if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) snd_opl4_seq_use_dec(opl4); |