Commit 72945b3d authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Mark Brown

ASoC: wm5110: Replace direct snd_soc_codec dapm field access

The dapm field of the snd_soc_codec struct is eventually going to be
removed, in preparation for this replace all manual access to codec->dapm
with snd_soc_codec_get_dapm().

While we are at it also remove the duplicated initialization of
priv->core.arizona->dapm.
Signed-off-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Acked-by: default avatarCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 0740135a
...@@ -1598,10 +1598,11 @@ static struct snd_soc_dai_driver wm5110_dai[] = { ...@@ -1598,10 +1598,11 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
static int wm5110_codec_probe(struct snd_soc_codec *codec) static int wm5110_codec_probe(struct snd_soc_codec *codec)
{ {
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec); struct wm5110_priv *priv = snd_soc_codec_get_drvdata(codec);
int ret; int ret;
priv->core.arizona->dapm = &codec->dapm; priv->core.arizona->dapm = dapm;
arizona_init_spk(codec); arizona_init_spk(codec);
arizona_init_gpio(codec); arizona_init_gpio(codec);
...@@ -1611,9 +1612,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec) ...@@ -1611,9 +1612,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
if (ret != 0) if (ret != 0)
return ret; return ret;
snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS"); snd_soc_dapm_disable_pin(dapm, "HAPTICS");
priv->core.arizona->dapm = &codec->dapm;
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment