summaryrefslogtreecommitdiffstats
path: root/sound/soc/generic
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2019-06-18 21:19:31 -0400
committerMark Brown <broonie@kernel.org>2019-06-19 07:58:34 -0400
commit6f043744573520095bdee9e532d75574060e62f4 (patch)
tree730825387f87abbe4445e3600657021448b53487 /sound/soc/generic
parent9ae6cdb184b651bf48b9feed4f947468ff1c3c1f (diff)
ASoC: simple-card-utils: don't select unnecessary Platform
ALSA SoC is now supporting "no Platform". Sound card doesn't need to select "CPU component" as "Platform" anymore if it doesn't need special Platform. This patch removes such settings. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/generic')
-rw-r--r--sound/soc/generic/simple-card-utils.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index ac8678fe55ff..3cf5cb21ea52 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -346,9 +346,18 @@ EXPORT_SYMBOL_GPL(asoc_simple_dai_init);
346 346
347void asoc_simple_canonicalize_platform(struct snd_soc_dai_link *dai_link) 347void asoc_simple_canonicalize_platform(struct snd_soc_dai_link *dai_link)
348{ 348{
349 /* Assumes platform == cpu */ 349 /*
350 if (!dai_link->platforms->of_node) 350 * no Platform
351 dai_link->platforms->of_node = dai_link->cpus->of_node; 351 *
352 * It will be waste of memory, but not be memory leak.
353 * see
354 * asoc_simple_init_priv()
355 * asoc_simple_priv
356 */
357 if (!dai_link->platforms->of_node) {
358 dai_link->platforms = NULL;
359 dai_link->num_platforms = 0;
360 }
352} 361}
353EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_platform); 362EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_platform);
354 363