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

Commit 318946a3 authored by Rohit Kumar's avatar Rohit Kumar
Browse files

ASoC: msm: 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: 2012091
Change-Id: I01e3d7d1a4237ac631bbc4bd4d1c047b8b7aa207
Signed-off-by: default avatarRohit Kumar <rohitkr@codeaurora.org>
parent 541fe938
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -676,7 +676,7 @@ static int msm_ext_get_spk(struct snd_kcontrol *kcontrol,
static int msm_ext_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()\n", __func__);
	if (msm_ext_spk_control == ucontrol->value.integer.value[0])