Skip to content

Commit

Permalink
ASoC: simple-card: use asoc_simple_card_parse_card_name()
Browse files Browse the repository at this point in the history
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Kuninori Morimoto authored and Mark Brown committed Jul 16, 2016
1 parent fc55c9b commit 3527d85
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions sound/soc/generic/simple-card.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,9 +427,6 @@ static int asoc_simple_card_parse_of(struct device_node *node,
if (!node)
return -EINVAL;

/* Parse the card name from DT */
snd_soc_of_parse_card_name(&priv->snd_card, PREFIX "name");

/* The off-codec widgets */
if (of_property_read_bool(node, PREFIX "widgets")) {
ret = snd_soc_of_parse_audio_simple_widgets(&priv->snd_card,
Expand All @@ -451,9 +448,6 @@ static int asoc_simple_card_parse_of(struct device_node *node,
if (ret == 0)
priv->mclk_fs = val;

dev_dbg(dev, "New simple-card: %s\n", priv->snd_card.name ?
priv->snd_card.name : "");

/* Single/Muti DAI link(s) & New style of DT node */
if (of_get_child_by_name(node, PREFIX "dai-link")) {
struct device_node *np = NULL;
Expand All @@ -476,8 +470,9 @@ static int asoc_simple_card_parse_of(struct device_node *node,
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, PREFIX);
if (ret)
return ret;

return 0;
}
Expand Down

0 comments on commit 3527d85

Please sign in to comment.