diff options
author | Fang, Yang A <yang.a.fang@intel.com> | 2014-12-23 23:49:05 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-12-24 11:56:52 +0000 |
commit | 6087fcab7bd5122e7264504854ec77d5be0286ff (patch) | |
tree | ceb1b017590d0bc59fb60f8d20b8421453d94cbc /sound | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) | |
download | linux-stable-6087fcab7bd5122e7264504854ec77d5be0286ff.tar.gz linux-stable-6087fcab7bd5122e7264504854ec77d5be0286ff.tar.bz2 linux-stable-6087fcab7bd5122e7264504854ec77d5be0286ff.zip |
ASoC: rt5677: fixed rt5677_dsp_vad_put rt5677_dsp_vad_get panic
snd_kcontrol_chip should return snd_soc_component instead of
snd_soc_codec
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/rt5677.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sound/soc/codecs/rt5677.c b/sound/soc/codecs/rt5677.c index 81fe1464d268..c0fbe1881439 100644 --- a/sound/soc/codecs/rt5677.c +++ b/sound/soc/codecs/rt5677.c @@ -784,8 +784,8 @@ static unsigned int bst_tlv[] = { static int rt5677_dsp_vad_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); - struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); + struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component); ucontrol->value.integer.value[0] = rt5677->dsp_vad_en; @@ -795,8 +795,9 @@ static int rt5677_dsp_vad_get(struct snd_kcontrol *kcontrol, static int rt5677_dsp_vad_put(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) { - struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol); - struct rt5677_priv *rt5677 = snd_soc_codec_get_drvdata(codec); + struct snd_soc_component *component = snd_kcontrol_chip(kcontrol); + struct rt5677_priv *rt5677 = snd_soc_component_get_drvdata(component); + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); rt5677->dsp_vad_en = !!ucontrol->value.integer.value[0]; |