mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
ASoC: wm2000: Fix wrong value references for boolean kctl
commit 00a14c2968e3d55817e0fa35c78106ca840537bf upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8f1208b631
commit
40dda5673b
1 changed files with 4 additions and 4 deletions
|
@ -605,7 +605,7 @@ static int wm2000_anc_mode_get(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||||
|
|
||||||
ucontrol->value.enumerated.item[0] = wm2000->anc_active;
|
ucontrol->value.integer.value[0] = wm2000->anc_active;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -615,7 +615,7 @@ static int wm2000_anc_mode_put(struct snd_kcontrol *kcontrol,
|
||||||
{
|
{
|
||||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||||
int anc_active = ucontrol->value.enumerated.item[0];
|
int anc_active = ucontrol->value.integer.value[0];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (anc_active > 1)
|
if (anc_active > 1)
|
||||||
|
@ -638,7 +638,7 @@ static int wm2000_speaker_get(struct snd_kcontrol *kcontrol,
|
||||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||||
|
|
||||||
ucontrol->value.enumerated.item[0] = wm2000->spk_ena;
|
ucontrol->value.integer.value[0] = wm2000->spk_ena;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -648,7 +648,7 @@ static int wm2000_speaker_put(struct snd_kcontrol *kcontrol,
|
||||||
{
|
{
|
||||||
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
|
||||||
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
struct wm2000_priv *wm2000 = dev_get_drvdata(codec->dev);
|
||||||
int val = ucontrol->value.enumerated.item[0];
|
int val = ucontrol->value.integer.value[0];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
if (val > 1)
|
if (val > 1)
|
||||||
|
|
Loading…
Reference in a new issue