]>
Commit | Line | Data |
---|---|---|
ce6d9ee5 GKH |
1 | From 24cc883c1fd16df34211ae41624aa6d3cd906693 Mon Sep 17 00:00:00 2001 |
2 | From: Takashi Iwai <tiwai@suse.de> | |
3 | Date: Tue, 10 Mar 2015 12:39:11 +0100 | |
4 | Subject: ASoC: wm8903: Fix wrong value references for boolean kctl | |
5 | ||
6 | From: Takashi Iwai <tiwai@suse.de> | |
7 | ||
8 | commit 24cc883c1fd16df34211ae41624aa6d3cd906693 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/wm8903.c | 4 ++-- | |
22 | 1 file changed, 2 insertions(+), 2 deletions(-) | |
23 | ||
24 | --- a/sound/soc/codecs/wm8903.c | |
25 | +++ b/sound/soc/codecs/wm8903.c | |
26 | @@ -442,7 +442,7 @@ static int wm8903_get_deemph(struct snd_ | |
27 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | |
28 | struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); | |
29 | ||
30 | - ucontrol->value.enumerated.item[0] = wm8903->deemph; | |
31 | + ucontrol->value.integer.value[0] = wm8903->deemph; | |
32 | ||
33 | return 0; | |
34 | } | |
35 | @@ -452,7 +452,7 @@ static int wm8903_put_deemph(struct snd_ | |
36 | { | |
37 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | |
38 | struct wm8903_priv *wm8903 = snd_soc_codec_get_drvdata(codec); | |
39 | - int deemph = ucontrol->value.enumerated.item[0]; | |
40 | + int deemph = ucontrol->value.integer.value[0]; | |
41 | int ret = 0; | |
42 | ||
43 | if (deemph > 1) |