aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-03-10 12:39:09 +0100
committerBen Hutchings <ben@decadent.org.uk>2015-05-09 23:16:28 +0100
commit121963ed2119f53c365fef4833a83441fac198ee (patch)
tree08bd295d4be400c130b6f23041006d058b97f1ff /sound
parent09b018672a57ea4f0df6f0066d4eae9c7e8dd3dd (diff)
downloadkernel_samsung_smdk4412-121963ed2119f53c365fef4833a83441fac198ee.zip
kernel_samsung_smdk4412-121963ed2119f53c365fef4833a83441fac198ee.tar.gz
kernel_samsung_smdk4412-121963ed2119f53c365fef4833a83441fac198ee.tar.bz2
ASoC: wm2000: Fix wrong value references for boolean kctl
commit 00a14c2968e3d55817e0fa35c78106ca840537bf upstream. The correct values referred by a boolean control are value.integer.value[], not value.enumerated.item[]. The former is long while the latter is int, so it's even incompatible on 64bit architectures. Signed-off-by: Takashi Iwai <tiwai@suse.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org> [bwh: Backported to 3.2: adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm2000.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm2000.c b/sound/soc/codecs/wm2000.c
index ba03dc2..d421140 100644
--- a/sound/soc/codecs/wm2000.c
+++ b/sound/soc/codecs/wm2000.c
@@ -614,7 +614,7 @@ static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
{
struct wm2000_priv *wm2000 = dev_get_drvdata(&wm2000_i2c->dev);
- ucontrol->value.enumerated.item[0] = wm2000->anc_active;
+ ucontrol->value.integer.value[0] = wm2000->anc_active;
return 0;
}
@@ -623,7 +623,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct wm2000_priv *wm2000 = dev_get_drvdata(&wm2000_i2c->dev);
- int anc_active = ucontrol->value.enumerated.item[0];
+ int anc_active = ucontrol->value.integer.value[0];
if (anc_active > 1)
return -EINVAL;
@@ -638,7 +638,7 @@ static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
{
struct wm2000_priv *wm2000 = dev_get_drvdata(&wm2000_i2c->dev);
- ucontrol->value.enumerated.item[0] = wm2000->spk_ena;
+ ucontrol->value.integer.value[0] = wm2000->spk_ena;
return 0;
}
@@ -647,7 +647,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct wm2000_priv *wm2000 = dev_get_drvdata(&wm2000_i2c->dev);
- int val = ucontrol->value.enumerated.item[0];
+ int val = ucontrol->value.integer.value[0];
if (val > 1)
return -EINVAL;