Skip to content

Commit 30e4b22

Browse files
ujfalusibroonie
authored andcommitted
ASoC: codecs: rt1011: Use component to get the dapm context in spk_mode_put
The correct helper to use in rt1011_recv_spk_mode_put() to retrieve the DAPM context is snd_soc_component_to_dapm(), from kcontrol we will receive NULL pointer. Closes: thesofproject/linux#5691 Fixes: 5b35bb5 ("ASoC: codecs: rt1011: convert to snd_soc_dapm_xxx()") Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com> Link: https://patch.msgid.link/20260310065350.18921-1-peter.ujfalusi@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 4185b95 commit 30e4b22

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sound/soc/codecs/rt1011.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ static int rt1011_recv_spk_mode_put(struct snd_kcontrol *kcontrol,
10471047
struct snd_ctl_elem_value *ucontrol)
10481048
{
10491049
struct snd_soc_component *component = snd_kcontrol_chip(kcontrol);
1050-
struct snd_soc_dapm_context *dapm = snd_soc_dapm_kcontrol_to_dapm(kcontrol);
1050+
struct snd_soc_dapm_context *dapm = snd_soc_component_to_dapm(component);
10511051
struct rt1011_priv *rt1011 =
10521052
snd_soc_component_get_drvdata(component);
10531053

0 commit comments

Comments
 (0)