diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-03-10 07:39:10 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-10 16:15:20 -0400 |
commit | bd14016fbf31aa199026f1e2358eab695f374eb1 (patch) | |
tree | b6c036efb10b52481476bdb0389b81fa8316b857 | |
parent | 00a14c2968e3d55817e0fa35c78106ca840537bf (diff) |
ASoC: wm8731: Fix wrong value references for boolean kctl
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>
Cc: <stable@vger.kernel.org>
-rw-r--r-- | sound/soc/codecs/wm8731.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c index 098c143f44d6..c6d10533e2bd 100644 --- a/sound/soc/codecs/wm8731.c +++ b/sound/soc/codecs/wm8731.c | |||
@@ -125,7 +125,7 @@ static int wm8731_get_deemph(struct snd_kcontrol *kcontrol, | |||
125 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | 125 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); |
126 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); | 126 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); |
127 | 127 | ||
128 | ucontrol->value.enumerated.item[0] = wm8731->deemph; | 128 | ucontrol->value.integer.value[0] = wm8731->deemph; |
129 | 129 | ||
130 | return 0; | 130 | return 0; |
131 | } | 131 | } |
@@ -135,7 +135,7 @@ static int wm8731_put_deemph(struct snd_kcontrol *kcontrol, | |||
135 | { | 135 | { |
136 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); | 136 | struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol); |
137 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); | 137 | struct wm8731_priv *wm8731 = snd_soc_codec_get_drvdata(codec); |
138 | int deemph = ucontrol->value.enumerated.item[0]; | 138 | int deemph = ucontrol->value.integer.value[0]; |
139 | int ret = 0; | 139 | int ret = 0; |
140 | 140 | ||
141 | if (deemph > 1) | 141 | if (deemph > 1) |