summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2015-06-01 10:10:28 +0200
committerMark Brown <broonie@kernel.org>2015-06-01 16:42:35 +0100
commit72945b3d3c78ab2babeb8ed8f00c18441f417bb9 (patch)
treee8cf5a1baa3d621289b51ebb380c0ba8e3e784f2 /sound
parent0740135a53f04cce7894e1751b34fe660d948cd1 (diff)
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: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm5110.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm5110.c b/sound/soc/codecs/wm5110.c
index fbaeddb3e903..67960009f0c4 100644
--- a/sound/soc/codecs/wm5110.c
+++ b/sound/soc/codecs/wm5110.c
@@ -1598,10 +1598,11 @@ static struct snd_soc_dai_driver wm5110_dai[] = {
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);
int ret;
- priv->core.arizona->dapm = &codec->dapm;
+ priv->core.arizona->dapm = dapm;
arizona_init_spk(codec);
arizona_init_gpio(codec);
@@ -1611,9 +1612,7 @@ static int wm5110_codec_probe(struct snd_soc_codec *codec)
if (ret != 0)
return ret;
- snd_soc_dapm_disable_pin(&codec->dapm, "HAPTICS");
-
- priv->core.arizona->dapm = &codec->dapm;
+ snd_soc_dapm_disable_pin(dapm, "HAPTICS");
return 0;
}