aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/phase.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:34:20 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:25:29 -0500
commit62932df8fb20ba2fb53a95fa52445eba22e821fe (patch)
tree335178d7438395a68a453a9c23624b3e9fc5ec40 /sound/pci/ice1712/phase.c
parent8b7547f95cbe8a5940df62ed730646fdfcba5fda (diff)
[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/ice1712/phase.c')
-rw-r--r--sound/pci/ice1712/phase.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/sound/pci/ice1712/phase.c b/sound/pci/ice1712/phase.c
index ec3757834b93..502da1c8b5f7 100644
--- a/sound/pci/ice1712/phase.c
+++ b/sound/pci/ice1712/phase.c
@@ -39,6 +39,8 @@
39#include <linux/interrupt.h> 39#include <linux/interrupt.h>
40#include <linux/init.h> 40#include <linux/init.h>
41#include <linux/slab.h> 41#include <linux/slab.h>
42#include <linux/mutex.h>
43
42#include <sound/core.h> 44#include <sound/core.h>
43 45
44#include "ice1712.h" 46#include "ice1712.h"
@@ -273,9 +275,9 @@ static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va
273{ 275{
274 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 276 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
275 277
276 down(&ice->gpio_mutex); 278 mutex_lock(&ice->gpio_mutex);
277 ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1; 279 ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1;
278 up(&ice->gpio_mutex); 280 mutex_unlock(&ice->gpio_mutex);
279 return 0; 281 return 0;
280} 282}
281 283
@@ -584,11 +586,11 @@ static int wm_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val
584 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol); 586 struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
585 unsigned short val; 587 unsigned short val;
586 588
587 down(&ice->gpio_mutex); 589 mutex_lock(&ice->gpio_mutex);
588 val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff; 590 val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
589 val = val > PCM_MIN ? (val - PCM_MIN) : 0; 591 val = val > PCM_MIN ? (val - PCM_MIN) : 0;
590 ucontrol->value.integer.value[0] = val; 592 ucontrol->value.integer.value[0] = val;
591 up(&ice->gpio_mutex); 593 mutex_unlock(&ice->gpio_mutex);
592 return 0; 594 return 0;
593} 595}
594 596