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

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

ASoC: tlv320aic31xx: Replace w->codec snd_soc_dapm_to_codec(w->dapm)



The codec field of the snd_soc_widget struct is eventually going to be
removed, use snd_soc_dapm_to_codec(w->dapm) instead.

Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0d76091c
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -349,7 +349,8 @@ static int aic31xx_wait_bits(struct aic31xx_priv *aic31xx, unsigned int reg,
static int aic31xx_dapm_power_event(struct snd_soc_dapm_widget *w,
				    struct snd_kcontrol *kcontrol, int event)
{
	struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(w->codec);
	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
	struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec);
	unsigned int reg = AIC31XX_DACFLAG1;
	unsigned int mask;

@@ -377,7 +378,7 @@ static int aic31xx_dapm_power_event(struct snd_soc_dapm_widget *w,
		reg = AIC31XX_ADCFLAG;
		break;
	default:
		dev_err(w->codec->dev, "Unknown widget '%s' calling %s\n",
		dev_err(codec->dev, "Unknown widget '%s' calling %s\n",
			w->name, __func__);
		return -EINVAL;
	}
@@ -388,7 +389,7 @@ static int aic31xx_dapm_power_event(struct snd_soc_dapm_widget *w,
	case SND_SOC_DAPM_POST_PMD:
		return aic31xx_wait_bits(aic31xx, reg, mask, 0, 5000, 100);
	default:
		dev_dbg(w->codec->dev,
		dev_dbg(codec->dev,
			"Unhandled dapm widget event %d from %s\n",
			event, w->name);
	}
@@ -433,7 +434,7 @@ static const struct snd_kcontrol_new aic31xx_dapm_spr_switch =
static int mic_bias_event(struct snd_soc_dapm_widget *w,
			  struct snd_kcontrol *kcontrol, int event)
{
	struct snd_soc_codec *codec = w->codec;
	struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
	struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec);

	switch (event) {