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, | |||
214 | opl4->fm_port = fm_port; | 214 | opl4->fm_port = fm_port; |
215 | opl4->pcm_port = pcm_port; | 215 | opl4->pcm_port = pcm_port; |
216 | spin_lock_init(&opl4->reg_lock); | 216 | spin_lock_init(&opl4->reg_lock); |
217 | init_MUTEX(&opl4->access_mutex); | 217 | mutex_init(&opl4->access_mutex); |
218 | 218 | ||
219 | err = snd_opl4_detect(opl4); | 219 | err = snd_opl4_detect(opl4); |
220 | if (err < 0) { | 220 | 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 { | |||
182 | struct snd_info_entry *proc_entry; | 182 | struct snd_info_entry *proc_entry; |
183 | int memory_access; | 183 | int memory_access; |
184 | #endif | 184 | #endif |
185 | struct semaphore access_mutex; | 185 | struct mutex access_mutex; |
186 | 186 | ||
187 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) | 187 | #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) |
188 | int used; | 188 | 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, | |||
28 | { | 28 | { |
29 | struct snd_opl4 *opl4 = entry->private_data; | 29 | struct snd_opl4 *opl4 = entry->private_data; |
30 | 30 | ||
31 | down(&opl4->access_mutex); | 31 | mutex_lock(&opl4->access_mutex); |
32 | if (opl4->memory_access) { | 32 | if (opl4->memory_access) { |
33 | up(&opl4->access_mutex); | 33 | mutex_unlock(&opl4->access_mutex); |
34 | return -EBUSY; | 34 | return -EBUSY; |
35 | } | 35 | } |
36 | opl4->memory_access++; | 36 | opl4->memory_access++; |
37 | up(&opl4->access_mutex); | 37 | mutex_unlock(&opl4->access_mutex); |
38 | return 0; | 38 | return 0; |
39 | } | 39 | } |
40 | 40 | ||
@@ -43,9 +43,9 @@ static int snd_opl4_mem_proc_release(struct snd_info_entry *entry, | |||
43 | { | 43 | { |
44 | struct snd_opl4 *opl4 = entry->private_data; | 44 | struct snd_opl4 *opl4 = entry->private_data; |
45 | 45 | ||
46 | down(&opl4->access_mutex); | 46 | mutex_lock(&opl4->access_mutex); |
47 | opl4->memory_access--; | 47 | opl4->memory_access--; |
48 | up(&opl4->access_mutex); | 48 | mutex_unlock(&opl4->access_mutex); |
49 | return 0; | 49 | return 0; |
50 | } | 50 | } |
51 | 51 | ||
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 | |||
62 | struct snd_opl4 *opl4 = private_data; | 62 | struct snd_opl4 *opl4 = private_data; |
63 | int err; | 63 | int err; |
64 | 64 | ||
65 | down(&opl4->access_mutex); | 65 | mutex_lock(&opl4->access_mutex); |
66 | 66 | ||
67 | if (opl4->used) { | 67 | if (opl4->used) { |
68 | up(&opl4->access_mutex); | 68 | mutex_unlock(&opl4->access_mutex); |
69 | return -EBUSY; | 69 | return -EBUSY; |
70 | } | 70 | } |
71 | opl4->used++; | 71 | opl4->used++; |
@@ -73,12 +73,12 @@ static int snd_opl4_seq_use(void *private_data, struct snd_seq_port_subscribe *i | |||
73 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) { | 73 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) { |
74 | err = snd_opl4_seq_use_inc(opl4); | 74 | err = snd_opl4_seq_use_inc(opl4); |
75 | if (err < 0) { | 75 | if (err < 0) { |
76 | up(&opl4->access_mutex); | 76 | mutex_unlock(&opl4->access_mutex); |
77 | return err; | 77 | return err; |
78 | } | 78 | } |
79 | } | 79 | } |
80 | 80 | ||
81 | up(&opl4->access_mutex); | 81 | mutex_unlock(&opl4->access_mutex); |
82 | 82 | ||
83 | snd_opl4_synth_reset(opl4); | 83 | snd_opl4_synth_reset(opl4); |
84 | return 0; | 84 | return 0; |
@@ -90,9 +90,9 @@ static int snd_opl4_seq_unuse(void *private_data, struct snd_seq_port_subscribe | |||
90 | 90 | ||
91 | snd_opl4_synth_shutdown(opl4); | 91 | snd_opl4_synth_shutdown(opl4); |
92 | 92 | ||
93 | down(&opl4->access_mutex); | 93 | mutex_lock(&opl4->access_mutex); |
94 | opl4->used--; | 94 | opl4->used--; |
95 | up(&opl4->access_mutex); | 95 | mutex_unlock(&opl4->access_mutex); |
96 | 96 | ||
97 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) | 97 | if (info->sender.client != SNDRV_SEQ_CLIENT_SYSTEM) |
98 | snd_opl4_seq_use_dec(opl4); | 98 | snd_opl4_seq_use_dec(opl4); |