ASoC: msm8996: Fix kernel crash in "Speaker Function" mixer control

Use snd_soc_kcontrol_codec instead of snd_kcontrol_chip
to obtain the codec information from the kcontrol.

CRs-Fixed: 1099607
Change-Id: Iba3004c2745e5f0bbe778e44c803826351b3b939
Signed-off-by: Aditya Bavanari <abavanar@codeaurora.org>
This commit is contained in:
Aditya Bavanari 2016-12-22 16:41:27 +05:30 committed by Gerrit - the friendly Code Review server
parent 580c141355
commit 4199451e83

View file

@ -351,7 +351,7 @@ static int msm8996_get_spk(struct snd_kcontrol *kcontrol,
static int msm8996_set_spk(struct snd_kcontrol *kcontrol,
struct snd_ctl_elem_value *ucontrol)
{
struct snd_soc_codec *codec = snd_kcontrol_chip(kcontrol);
struct snd_soc_codec *codec = snd_soc_kcontrol_codec(kcontrol);
pr_debug("%s() ucontrol->value.integer.value[0] = %ld\n",
__func__, ucontrol->value.integer.value[0]);