]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.19.4/asoc-wm8955-fix-wrong-value-references-for-boolean-kctl.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.4 / asoc-wm8955-fix-wrong-value-references-for-boolean-kctl.patch
CommitLineData
ce6d9ee5
GKH
1From 07892b10356f17717abdc578acbef72db86c880e Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 10 Mar 2015 12:39:13 +0100
4Subject: ASoC: wm8955: Fix wrong value references for boolean kctl
5
6From: Takashi Iwai <tiwai@suse.de>
7
8commit 07892b10356f17717abdc578acbef72db86c880e upstream.
9
10The correct values referred by a boolean control are
11value.integer.value[], not value.enumerated.item[].
12The former is long while the latter is int, so it's even incompatible
13on 64bit architectures.
14
15Signed-off-by: Takashi Iwai <tiwai@suse.de>
16Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
17Signed-off-by: Mark Brown <broonie@kernel.org>
18Signed-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;