]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ASoC: Remove CODEC pointer from snd_soc_dapm_context
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 29 Sep 2014 09:40:42 +0000 (11:40 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 29 Sep 2014 17:25:52 +0000 (18:25 +0100)
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>
include/sound/soc-dapm.h
sound/soc/soc-core.c
sound/soc/soc-dapm.c

index aac04ff84eea5674279fd22984db6ca9b79ba8c7..d60c61b4b3418b512572f7d9ef4cea83bc796148 100644 (file)
@@ -593,7 +593,6 @@ struct snd_soc_dapm_context {
 
        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 */
index 052f59c1917f4f477420f9df0504a49a6c46d43a..8d45eec141a968b015a71d8072661e07590b7945 100644 (file)
@@ -4351,7 +4351,6 @@ int snd_soc_register_codec(struct device *dev,
        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;
index 8348352dc2c62c484a1efba6f04c290367b93864..1f1e9657481a942d44277da9bdfa0470c3c321d5 100644 (file)
@@ -3107,7 +3107,7 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
        }
 
        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);