提交 c61ac6b7 编写于 作者: L Lars-Peter Clausen 提交者: Mark Brown

ASoC: tlv320dac33: 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: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 38d3df61
......@@ -423,17 +423,18 @@ static int dac33_hard_power(struct snd_soc_codec *codec, int power)
static int dac33_playback_event(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *kcontrol, int event)
{
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(w->codec);
struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
struct tlv320dac33_priv *dac33 = snd_soc_codec_get_drvdata(codec);
switch (event) {
case SND_SOC_DAPM_PRE_PMU:
if (likely(dac33->substream)) {
dac33_calculate_times(dac33->substream, w->codec);
dac33_prepare_chip(dac33->substream, w->codec);
dac33_calculate_times(dac33->substream, codec);
dac33_prepare_chip(dac33->substream, codec);
}
break;
case SND_SOC_DAPM_POST_PMD:
dac33_disable_digital(w->codec);
dac33_disable_digital(codec);
break;
}
return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册