]>
Commit | Line | Data |
---|---|---|
ce6d9ee5 GKH |
1 | From 07892b10356f17717abdc578acbef72db86c880e Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Tue, 10 Mar 2015 12:39:13 +0100 | |
4 | Subject: ASoC: wm8955: Fix wrong value references for boolean kctl | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit 07892b10356f17717abdc578acbef72db86c880e upstream. | |
9 | ||
10 | The correct values referred by a boolean control are | |
11 | value.integer.value[], not value.enumerated.item[]. | |
12 | The former is long while the latter is int, so it's even incompatible | |
13 | on 64bit architectures. | |
14 | ||
15 | Signed-off-by: Takashi Iwai <tiwai@suse.de> | |
16 | Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> | |
17 | Signed-off-by: Mark Brown <broonie@kernel.org> | |
18 | Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> | |
19 | ||
20 | --- | |
21 | sound/soc/codecs/wm8955.c | 4 ++-- | |
22 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
23 | ||
24 | --- a/sound/soc/codecs/wm8955.c | |
25 | +++ b/sound/soc/codecs/wm8955.c | |
26 | @@ -393,7 +393,7 @@ static int wm8955_get_deemph(struct snd_ | |
27 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | |
28 | struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); | |
29 | ||
30 | - ucontrol->value.enumerated.item[0] = wm8955->deemph; | |
31 | + ucontrol->value.integer.value[0] = wm8955->deemph; | |
32 | return 0; | |
33 | } | |
34 | ||
35 | @@ -402,7 +402,7 @@ static int wm8955_put_deemph(struct snd_ | |
36 | { | |
37 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | |
38 | struct wm8955_priv *wm8955 = snd_soc_codec_get_drvdata(codec); | |
39 | - int deemph = ucontrol->value.enumerated.item[0]; | |
40 | + int deemph = ucontrol->value.integer.value[0]; | |
41 | ||
42 | if (deemph > 1) | |
43 | return -EINVAL; |