Commit f87a3e82 authored by Xiubo Li's avatar Xiubo Li Committed by Mark Brown

ASoC: simple-card: fix the DAPM routes map parsing

The simple-card's DAPM route maping is optional.
Signed-off-by: default avatarXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent e2a19ac6
......@@ -134,10 +134,12 @@ static int asoc_simple_card_parse_of(struct device_node *node,
(SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
/* DAPM routes */
ret = snd_soc_of_parse_audio_routing(&info->snd_card,
if (of_property_read_bool(node, "simple-audio-routing")) {
ret = snd_soc_of_parse_audio_routing(&info->snd_card,
"simple-audio-routing");
if (ret)
return ret;
if (ret)
return ret;
}
/* CPU sub-node */
ret = -EINVAL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment