diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-16 16:33:08 +0100 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 10:25:03 +0100 |
commit | 8b7547f95cbe8a5940df62ed730646fdfcba5fda (patch) | |
tree | 704102a2b9eaef96cf8b96c46e9e48855de64ea3 /sound/isa/sb/sb16_csp.c | |
parent | ef9f0a42db987e7e2df72289fb4522d24027786b (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/sb16_csp.c')
-rw-r--r-- | sound/isa/sb/sb16_csp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/isa/sb/sb16_csp.c b/sound/isa/sb/sb16_csp.c index 9c2b5efbacb..9703c68e4e0 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) p->ops.csp_stop = snd_sb_csp_stop; p->ops.csp_qsound_transfer = snd_sb_csp_qsound_transfer; - init_MUTEX(&p->access_mutex); + mutex_init(&p->access_mutex); sprintf(hw->name, "CSP v%d.%d", (version >> 4), (version & 0x0f)); hw->iface = SNDRV_HWDEP_IFACE_SB16CSP; hw->private_data = p; @@ -265,13 +265,13 @@ static int snd_sb_csp_release(struct snd_hwdep * hw, struct file *file) */ static int snd_sb_csp_use(struct snd_sb_csp * p) { - down(&p->access_mutex); + mutex_lock(&p->access_mutex); if (p->used) { - up(&p->access_mutex); + mutex_unlock(&p->access_mutex); return -EAGAIN; } p->used++; - up(&p->access_mutex); + mutex_unlock(&p->access_mutex); return 0; @@ -282,9 +282,9 @@ static int snd_sb_csp_use(struct snd_sb_csp * p) */ static int snd_sb_csp_unuse(struct snd_sb_csp * p) { - down(&p->access_mutex); + mutex_lock(&p->access_mutex); p->used--; - up(&p->access_mutex); + mutex_unlock(&p->access_mutex); return 0; } |