提交 f87a3e82 编写于 作者: X Xiubo Li 提交者: Mark Brown

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

The simple-card's DAPM route maping is optional.
Signed-off-by: NXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册