diff mbox

[22/39,v2] ASoC: simple-card: use asoc_simple_card_canonicalize_dailink()

Message ID 87k2iar47q.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State Changes Requested
Delegated to: Geert Uytterhoeven
Headers show

Commit Message

Kuninori Morimoto May 31, 2016, 9:07 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-card.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 09ccbb0..11fd7de 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -280,14 +280,9 @@  static int asoc_simple_card_dai_link_of(struct device_node *node,
 	if (ret < 0)
 		goto dai_link_of_err;
 
-	if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) {
-		ret = -EINVAL;
+	ret = asoc_simple_card_canonicalize_dailink(dai_link);
+	if (ret < 0)
 		goto dai_link_of_err;
-	}
-
-	/* Assumes platform == cpu */
-	if (!dai_link->platform_of_node)
-		dai_link->platform_of_node = dai_link->cpu_of_node;
 
 	ret = asoc_simple_card_parse_dailink_name(dev, dai_link);
 	if (ret < 0)