From: Lars-Peter Clausen Date: Sat, 11 Apr 2015 11:11:28 +0000 (+0200) Subject: ASoC: davinci-evm: Use card DAPM context to access widgets X-Git-Tag: firefly_0821_release~176^2~1862^2~14^2~7^3 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b213b44a96ed1f868f68b094dbcf8fc9622984ef;p=firefly-linux-kernel-4.4.55.git ASoC: davinci-evm: Use card DAPM context to access widgets The dapm field of the snd_soc_codec struct will eventually be removed (replaced with the DAPM context from the component embedded inside the CODEC). Replace its usage with the card's DAPM context. The idea is that DAPM is hierarchical and with the card at the root it is possible to access widgets from other contexts through the card context. Signed-off-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c index b6bb5947a8a8..1f314a836f2a 100644 --- a/sound/soc/davinci/davinci-evm.c +++ b/sound/soc/davinci/davinci-evm.c @@ -117,7 +117,6 @@ static const struct snd_soc_dapm_route audio_map[] = { static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_card *card = rtd->card; - struct snd_soc_codec *codec = rtd->codec; struct device_node *np = card->dev->of_node; int ret; @@ -136,9 +135,9 @@ static int evm_aic3x_init(struct snd_soc_pcm_runtime *rtd) } /* not connected */ - snd_soc_dapm_nc_pin(&codec->dapm, "MONO_LOUT"); - snd_soc_dapm_nc_pin(&codec->dapm, "HPLCOM"); - snd_soc_dapm_nc_pin(&codec->dapm, "HPRCOM"); + snd_soc_dapm_nc_pin(&card->dapm, "MONO_LOUT"); + snd_soc_dapm_nc_pin(&card->dapm, "HPLCOM"); + snd_soc_dapm_nc_pin(&card->dapm, "HPRCOM"); return 0; }