ASoC: simple-card: use asoc_simple_card_canonicalize_dailink()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 9 Aug 2016 05:50:02 +0000 (05:50 +0000)
committerMark Brown <broonie@kernel.org>
Tue, 9 Aug 2016 11:43:55 +0000 (12:43 +0100)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/generic/simple-card.c

index 03ecca85a7244b4f3ffe8e4799f1b9d7a859d9ab..8b1efdd2b11512cd8d4f5ad82dd95cac910e32be 100644 (file)
@@ -286,14 +286,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_set_dailink_name(dev, dai_link,
                                                "%s-%s",