aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/sb
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:33:08 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:25:03 -0500
commit8b7547f95cbe8a5940df62ed730646fdfcba5fda (patch)
tree704102a2b9eaef96cf8b96c46e9e48855de64ea3 /sound/isa/sb
parentef9f0a42db987e7e2df72289fb4522d24027786b (diff)
[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/sb')
-rw-r--r--sound/isa/sb/sb16_csp.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c
index 9c2b5efbacbf..9703c68e4e08 100644
--- a/sound/isa/sb/sb16_csp.c
+++ b/sound/isa/sb/sb16_csp.c
@@ -138,7 +138,7 @@ int snd_sb_csp_new(struct snd_sb *chip, int device, struct snd_hwdep ** rhwdep)
138 p->ops.csp_stop = snd_sb_csp_stop; 138 p->ops.csp_stop = snd_sb_csp_stop;
139 p->ops.csp_qsound_transfer = snd_sb_csp_qsound_transfer; 139 p->ops.csp_qsound_transfer = snd_sb_csp_qsound_transfer;
140 140
141 init_MUTEX(&p->access_mutex); 141 mutex_init(&p->access_mutex);
142 sprintf(hw->name, "CSP v%d.%d", (version >> 4), (version & 0x0f)); 142 sprintf(hw->name, "CSP v%d.%d", (version >> 4), (version & 0x0f));
143 hw->iface = SNDRV_HWDEP_IFACE_SB16CSP; 143 hw->iface = SNDRV_HWDEP_IFACE_SB16CSP;
144 hw->private_data = p; 144 hw->private_data = p;
@@ -265,13 +265,13 @@ static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file)
265 */ 265 */
266static int snd_sb_csp_use(struct snd_sb_csp * p) 266static int snd_sb_csp_use(struct snd_sb_csp * p)
267{ 267{
268 down(&p->access_mutex); 268 mutex_lock(&p->access_mutex);
269 if (p->used) { 269 if (p->used) {
270 up(&p->access_mutex); 270 mutex_unlock(&p->access_mutex);
271 return -EAGAIN; 271 return -EAGAIN;
272 } 272 }
273 p->used++; 273 p->used++;
274 up(&p->access_mutex); 274 mutex_unlock(&p->access_mutex);
275 275
276 return 0; 276 return 0;
277 277
@@ -282,9 +282,9 @@ static int snd_sb_csp_use(struct snd_sb_csp * p)
282 */ 282 */
283static int snd_sb_csp_unuse(struct snd_sb_csp * p) 283static int snd_sb_csp_unuse(struct snd_sb_csp * p)
284{ 284{
285 down(&p->access_mutex); 285 mutex_lock(&p->access_mutex);
286 p->used--; 286 p->used--;
287 up(&p->access_mutex); 287 mutex_unlock(&p->access_mutex);
288 288
289 return 0; 289 return 0;
290} 290}