ASoC: Remove platform field from snd_soc_dai
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 3 Nov 2014 09:31:48 +0000 (10:31 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 3 Nov 2014 12:17:07 +0000 (12:17 +0000)
Typically a DAI does not need direct access to the platform. Currently the
only user of this field is in a platform driver where we have a more direct
way of getting a pointer to the platform. This patch updates the driver to
use the more direct way and then removes the platform field from the
snd_soc_dai struct.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc-dai.h
sound/soc/soc-core.c
sound/soc/txx9/txx9aclc.c

index e8b3080d196a7d6a336caa7b56ede832f4e44607..45d0fa10ab9ed3286b3970419e19ac306a548d41 100644 (file)
@@ -268,7 +268,6 @@ struct snd_soc_dai {
        unsigned int sample_bits;
 
        /* parent platform/codec */
-       struct snd_soc_platform *platform;
        struct snd_soc_codec *codec;
        struct snd_soc_component *component;
 
index 0509d726759d746f3e7f59a027a188fba891b5ce..e20bb65a163492218055fdf151bb8e6f90c5abe2 100644 (file)
@@ -1309,7 +1309,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
 {
        struct snd_soc_dai_link *dai_link = &card->dai_link[num];
        struct snd_soc_pcm_runtime *rtd = &card->rtd[num];
-       struct snd_soc_platform *platform = rtd->platform;
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        int i, ret;
 
@@ -1317,7 +1316,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order)
                        card->name, num, order);
 
        /* config components */
-       cpu_dai->platform = platform;
        cpu_dai->card = card;
        for (i = 0; i < rtd->num_codecs; i++)
                rtd->codec_dais[i]->card = card;
index cd71fd889d8bf834cc71cd1e491bdd9c590d78ef..00b7e2d026901fadc17c635f47c2bd07c3ea4473 100644 (file)
@@ -292,7 +292,7 @@ static int txx9aclc_pcm_new(struct snd_soc_pcm_runtime *rtd)
        struct snd_card *card = rtd->card->snd_card;
        struct snd_soc_dai *dai = rtd->cpu_dai;
        struct snd_pcm *pcm = rtd->pcm;
-       struct platform_device *pdev = to_platform_device(dai->platform->dev);
+       struct platform_device *pdev = to_platform_device(rtd->platform->dev);
        struct txx9aclc_soc_device *dev;
        struct resource *r;
        int i;