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

Commit a761f87f authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown
Browse files

ASoC: rx51: Use snd_soc_dapm_to_codec() instead of dapm->codec



The CODEC struct in the snd_soc_dapm_context struct is deprecated and
scheduled for removal. Use the snd_soc_dapm_to_codec() function instead.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarJarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9cca023e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -168,7 +168,7 @@ static int rx51_spk_event(struct snd_soc_dapm_widget *w,
static int rx51_hp_event(struct snd_soc_dapm_widget *w,
static int rx51_hp_event(struct snd_soc_dapm_widget *w,
			 struct snd_kcontrol *k, int event)
			 struct snd_kcontrol *k, int event)
{
{
	struct snd_soc_codec *codec = w->dapm->codec;
	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);


	if (SND_SOC_DAPM_EVENT_ON(event))
	if (SND_SOC_DAPM_EVENT_ON(event))
		tpa6130a2_stereo_enable(codec, 1);
		tpa6130a2_stereo_enable(codec, 1);