Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 029c8e39 authored by Aditya Bavanari's avatar Aditya Bavanari Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarAditya Bavanari <abavanar@codeaurora.org>
parent dfdaa5be
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -353,7 +353,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]);