]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - sound/pci/ice1712/phase.c
[ALSA] semaphore -> mutex (PCI part)
[mv-sheeva.git] / sound / pci / ice1712 / phase.c
index ec3757834b93f2c4be0d313d2aaf579cfb05eab7..502da1c8b5f71946d070171f922b10ec46a66df0 100644 (file)
@@ -39,6 +39,8 @@
 #include <linux/interrupt.h>
 #include <linux/init.h>
 #include <linux/slab.h>
+#include <linux/mutex.h>
+
 #include <sound/core.h>
 
 #include "ice1712.h"
@@ -273,9 +275,9 @@ static int wm_pcm_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_va
 {
        struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
 
-       down(&ice->gpio_mutex);
+       mutex_lock(&ice->gpio_mutex);
        ucontrol->value.integer.value[0] = (wm_get(ice, WM_MUTE) & 0x10) ? 0 : 1;
-       up(&ice->gpio_mutex);
+       mutex_unlock(&ice->gpio_mutex);
        return 0;
 }
 
@@ -584,11 +586,11 @@ static int wm_pcm_vol_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_val
        struct snd_ice1712 *ice = snd_kcontrol_chip(kcontrol);
        unsigned short val;
 
-       down(&ice->gpio_mutex);
+       mutex_lock(&ice->gpio_mutex);
        val = wm_get(ice, WM_DAC_DIG_MASTER_ATTEN) & 0xff;
        val = val > PCM_MIN ? (val - PCM_MIN) : 0;
        ucontrol->value.integer.value[0] = val;
-       up(&ice->gpio_mutex);
+       mutex_unlock(&ice->gpio_mutex);
        return 0;
 }