未验证 提交 1dfa5a5a 编写于 作者: J Jerome Brunet 提交者: Mark Brown

ASoC: core: allow a dt node to provide several components

At the moment, querying the dai_name will stop of the first component
matching the dt node. This does not allow a device (single dt node) to
provide several ASoC components which could then be used through DT.

This change let the search go on if the xlate function of the component
returns an error, giving the possibility to another component to match
and return the dai_name.
Signed-off-by: NJerome Brunet <jbrunet@baylibre.com>
Link: https://lore.kernel.org/r/20200213155159.3235792-2-jbrunet@baylibre.comSigned-off-by: NMark Brown <broonie@kernel.org>
上级 0c48a653
......@@ -3102,6 +3102,14 @@ int snd_soc_get_dai_name(struct of_phandle_args *args,
*dai_name = dai->driver->name;
if (!*dai_name)
*dai_name = pos->name;
} else if (ret) {
/*
* if another error than ENOTSUPP is returned go on and
* check if another component is provided with the same
* node. This may happen if a device provides several
* components
*/
continue;
}
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册