summaryrefslogtreecommitdiff
path: root/sound/pci/vx222
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 18:34:20 +0300
committerJaroslav Kysela <perex@suse.cz>2006-03-22 12:25:29 +0300
commit62932df8fb20ba2fb53a95fa52445eba22e821fe (patch)
tree335178d7438395a68a453a9c23624b3e9fc5ec40 /sound/pci/vx222
parent8b7547f95cbe8a5940df62ed730646fdfcba5fda (diff)
downloadlinux-62932df8fb20ba2fb53a95fa52445eba22e821fe.tar.xz
[ALSA] semaphore -> mutex (PCI 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/pci/vx222')
-rw-r--r--sound/pci/vx222/vx222_ops.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/sound/pci/vx222/vx222_ops.c b/sound/pci/vx222/vx222_ops.c
index c705af409b0f..9b6d345b83a6 100644
--- a/sound/pci/vx222/vx222_ops.c
+++ b/sound/pci/vx222/vx222_ops.c
@@ -24,6 +24,8 @@
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/firmware.h>
+#include <linux/mutex.h>
+
#include <sound/core.h>
#include <sound/control.h>
#include <asm/io.h>
@@ -861,10 +863,10 @@ static int vx_input_level_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem
{
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
- down(&_chip->mixer_mutex);
+ mutex_lock(&_chip->mixer_mutex);
ucontrol->value.integer.value[0] = chip->input_level[0];
ucontrol->value.integer.value[1] = chip->input_level[1];
- up(&_chip->mixer_mutex);
+ mutex_unlock(&_chip->mixer_mutex);
return 0;
}
@@ -872,16 +874,16 @@ static int vx_input_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem
{
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
- down(&_chip->mixer_mutex);
+ mutex_lock(&_chip->mixer_mutex);
if (chip->input_level[0] != ucontrol->value.integer.value[0] ||
chip->input_level[1] != ucontrol->value.integer.value[1]) {
chip->input_level[0] = ucontrol->value.integer.value[0];
chip->input_level[1] = ucontrol->value.integer.value[1];
vx2_set_input_level(chip);
- up(&_chip->mixer_mutex);
+ mutex_unlock(&_chip->mixer_mutex);
return 1;
}
- up(&_chip->mixer_mutex);
+ mutex_unlock(&_chip->mixer_mutex);
return 0;
}
@@ -907,14 +909,14 @@ static int vx_mic_level_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_v
{
struct vx_core *_chip = snd_kcontrol_chip(kcontrol);
struct snd_vx222 *chip = (struct snd_vx222 *)_chip;
- down(&_chip->mixer_mutex);
+ mutex_lock(&_chip->mixer_mutex);
if (chip->mic_level != ucontrol->value.integer.value[0]) {
chip->mic_level = ucontrol->value.integer.value[0];
vx2_set_input_level(chip);
- up(&_chip->mixer_mutex);
+ mutex_unlock(&_chip->mixer_mutex);
return 1;
}
- up(&_chip->mixer_mutex);
+ mutex_unlock(&_chip->mixer_mutex);
return 0;
}