ASoC: Remove CODEC pointer from snd_soc_dapm_context

The only remaining user of the CODEC pointer in the DAPM struct is to
initialize the CODEC pointer in the widget struct. The later is scheduled
for removal, but has still a few users left. For now use
dapm->component->codec to initialize it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
diff --git a/include/sound/soc-dapm.h b/include/sound/soc-dapm.h
index aac04ff..d60c61b 100644
--- a/include/sound/soc-dapm.h
+++ b/include/sound/soc-dapm.h
@@ -593,7 +593,6 @@
 
 	struct device *dev; /* from parent - for debug */
 	struct snd_soc_component *component; /* parent component */
-	struct snd_soc_codec *codec; /* parent codec */
 	struct snd_soc_card *card; /* parent card */
 
 	/* used during DAPM updates */
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 052f59c..8d45eec 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -4351,7 +4351,6 @@
 	if (codec_drv->read)
 		codec->component.read = snd_soc_codec_drv_read;
 	codec->component.ignore_pmdown_time = codec_drv->ignore_pmdown_time;
-	codec->dapm.codec = codec;
 	codec->dapm.idle_bias_off = codec_drv->idle_bias_off;
 	if (codec_drv->seq_notifier)
 		codec->dapm.seq_notifier = codec_drv->seq_notifier;
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index 8348352..1f1e965 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3107,7 +3107,7 @@
 	}
 
 	w->dapm = dapm;
-	w->codec = dapm->codec;
+	w->codec = dapm->component->codec;
 	INIT_LIST_HEAD(&w->sources);
 	INIT_LIST_HEAD(&w->sinks);
 	INIT_LIST_HEAD(&w->list);