ASoC: rsrc-card: use asoc_simple_card_parse_card_name()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 12 Jul 2016 00:00:00 +0000 (00:00 +0000)
committerMark Brown <broonie@kernel.org>
Sat, 16 Jul 2016 12:05:09 +0000 (13:05 +0100)
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/sh/rcar/rsrc-card.c

index 239a13a..fa37f84 100644 (file)
@@ -395,9 +395,6 @@ static int rsrc_card_parse_of(struct device_node *node,
                                               "audio-routing");
        }
 
-       /* Parse the card name from DT */
-       snd_soc_of_parse_card_name(&priv->snd_card, "card-name");
-
        /* sampling rate convert */
        of_property_read_u32(node, "convert-rate", &priv->convert_rate);
 
@@ -413,8 +410,9 @@ static int rsrc_card_parse_of(struct device_node *node,
        if (ret < 0)
                return ret;
 
-       if (!priv->snd_card.name)
-               priv->snd_card.name = priv->snd_card.dai_link->name;
+       ret = asoc_simple_card_parse_card_name(&priv->snd_card, "card-");
+       if (ret < 0)
+               return ret;
 
        return 0;
 }