]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blame - releases/3.19.4/asoc-wm8903-fix-wrong-value-references-for-boolean-kctl.patch
5.1-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 3.19.4 / asoc-wm8903-fix-wrong-value-references-for-boolean-kctl.patch
CommitLineData
ce6d9ee5
GKH
1From 24cc883c1fd16df34211ae41624aa6d3cd906693 Mon Sep 17 00:00:00 2001
2From: Takashi Iwai <tiwai@suse.de>
3Date: Tue, 10 Mar 2015 12:39:11 +0100
4Subject: ASoC: wm8903: Fix wrong value references for boolean kctl
5
6From: Takashi Iwai <tiwai@suse.de>
7
8commit 24cc883c1fd16df34211ae41624aa6d3cd906693 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/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)