summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sound/soc/generic/simple-card-utils.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index 3cf5cb21ea52..ac8678fe55ff 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -346,18 +346,9 @@ EXPORT_SYMBOL_GPL(asoc_simple_dai_init);
void asoc_simple_canonicalize_platform(struct snd_soc_dai_link *dai_link)
{
- /*
- * no Platform
- *
- * It will be waste of memory, but not be memory leak.
- * see
- * asoc_simple_init_priv()
- * asoc_simple_priv
- */
- if (!dai_link->platforms->of_node) {
- dai_link->platforms = NULL;
- dai_link->num_platforms = 0;
- }
+ /* Assumes platform == cpu */
+ if (!dai_link->platforms->of_node)
+ dai_link->platforms->of_node = dai_link->cpus->of_node;
}
EXPORT_SYMBOL_GPL(asoc_simple_canonicalize_platform);