From: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> asoc_simple_card_sub_parse_of() has parent_node. We can use it instead of is_top_level_node. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx> --- sound/soc/generic/simple-card.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c index 9481e70..d3aa472 100644 --- a/sound/soc/generic/simple-card.c +++ b/sound/soc/generic/simple-card.c @@ -167,8 +167,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *parent_node, struct device_node *node, struct device *dev, struct snd_soc_dai_link *dai_link, - struct simple_dai_props *dai_props, - bool is_top_level_node) + struct simple_dai_props *dai_props) { struct device_node *np = NULL; struct device_node *bitclkmaster = NULL; @@ -179,7 +178,7 @@ static int asoc_simple_card_dai_link_of(struct device_node *parent_node, char *prefix = ""; int ret; - if (is_top_level_node) + if (!parent_node) prefix = "simple-audio-card,"; daifmt = snd_soc_of_parse_daifmt(node, prefix, @@ -379,8 +378,7 @@ static int asoc_simple_card_parse_of(struct device_node *node, dev_dbg(dev, "\tlink %d:\n", i); ret = asoc_simple_card_dai_link_of(node, np, dev, dai_link + i, - dai_props + i, - false); + dai_props + i); if (ret < 0) { of_node_put(np); return ret; @@ -389,7 +387,7 @@ static int asoc_simple_card_parse_of(struct device_node *node, } } else { ret = asoc_simple_card_dai_link_of(NULL, node, dev, - dai_link, dai_props, true); + dai_link, dai_props); if (ret < 0) return ret; } -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html