diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-03 04:31:48 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-03 07:17:07 -0500 |
commit | 2a374b78f5c2b5f31d35f8a7cd004989d6936756 (patch) | |
tree | e8883011d325f0090c751a14da2aae1d3e98336e | |
parent | dd63a9c2952ed142c64fd68c1a74d0d6fcac586f (diff) |
ASoC: Remove platform field from snd_soc_dai
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>
-rw-r--r-- | include/sound/soc-dai.h | 1 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 2 | ||||
-rw-r--r-- | sound/soc/txx9/txx9aclc.c | 2 |
3 files changed, 1 insertions, 4 deletions
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h index e8b3080d196a..45d0fa10ab9e 100644 --- a/include/sound/soc-dai.h +++ b/include/sound/soc-dai.h | |||
@@ -268,7 +268,6 @@ struct snd_soc_dai { | |||
268 | unsigned int sample_bits; | 268 | unsigned int sample_bits; |
269 | 269 | ||
270 | /* parent platform/codec */ | 270 | /* parent platform/codec */ |
271 | struct snd_soc_platform *platform; | ||
272 | struct snd_soc_codec *codec; | 271 | struct snd_soc_codec *codec; |
273 | struct snd_soc_component *component; | 272 | struct snd_soc_component *component; |
274 | 273 | ||
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 0509d726759d..e20bb65a1634 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1309,7 +1309,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order) | |||
1309 | { | 1309 | { |
1310 | struct snd_soc_dai_link *dai_link = &card->dai_link[num]; | 1310 | struct snd_soc_dai_link *dai_link = &card->dai_link[num]; |
1311 | struct snd_soc_pcm_runtime *rtd = &card->rtd[num]; | 1311 | struct snd_soc_pcm_runtime *rtd = &card->rtd[num]; |
1312 | struct snd_soc_platform *platform = rtd->platform; | ||
1313 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; | 1312 | struct snd_soc_dai *cpu_dai = rtd->cpu_dai; |
1314 | int i, ret; | 1313 | int i, ret; |
1315 | 1314 | ||
@@ -1317,7 +1316,6 @@ static int soc_probe_link_dais(struct snd_soc_card *card, int num, int order) | |||
1317 | card->name, num, order); | 1316 | card->name, num, order); |
1318 | 1317 | ||
1319 | /* config components */ | 1318 | /* config components */ |
1320 | cpu_dai->platform = platform; | ||
1321 | cpu_dai->card = card; | 1319 | cpu_dai->card = card; |
1322 | for (i = 0; i < rtd->num_codecs; i++) | 1320 | for (i = 0; i < rtd->num_codecs; i++) |
1323 | rtd->codec_dais[i]->card = card; | 1321 | rtd->codec_dais[i]->card = card; |
diff --git a/sound/soc/txx9/txx9aclc.c b/sound/soc/txx9/txx9aclc.c index cd71fd889d8b..00b7e2d02690 100644 --- a/sound/soc/txx9/txx9aclc.c +++ b/sound/soc/txx9/txx9aclc.c | |||
@@ -292,7 +292,7 @@ static int txx9aclc_pcm_new(struct snd_soc_pcm_runtime *rtd) | |||
292 | struct snd_card *card = rtd->card->snd_card; | 292 | struct snd_card *card = rtd->card->snd_card; |
293 | struct snd_soc_dai *dai = rtd->cpu_dai; | 293 | struct snd_soc_dai *dai = rtd->cpu_dai; |
294 | struct snd_pcm *pcm = rtd->pcm; | 294 | struct snd_pcm *pcm = rtd->pcm; |
295 | struct platform_device *pdev = to_platform_device(dai->platform->dev); | 295 | struct platform_device *pdev = to_platform_device(rtd->platform->dev); |
296 | struct txx9aclc_soc_device *dev; | 296 | struct txx9aclc_soc_device *dev; |
297 | struct resource *r; | 297 | struct resource *r; |
298 | int i; | 298 | int i; |