[alsa-devel] soc-core: Questions about cpus->name && cpus->of_node
Hello Morimoto-san,
I have a question about this snippet from sound/soc/soc-core.c
» /* » * CPU device may be specified by either name or OF node, but » * can be left unspecified, and will be matched based on DAI » * name alone.. » */ » if (link->cpus->name && link->cpus->of_node) { » » dev_err(card->dev, » » » "ASoC: Neither/both cpu name/of_node are set for %s\n", » » » link->name); » » return -EINVAL; » }
Here either the warning message is wrong OR the if () condition is wrong.
If the link->cpus->name = NULL && link->cpus->of_node == NULL the warning message will be not be printed.
Hi Daniel
» /* » * CPU device may be specified by either name or OF node, but » * can be left unspecified, and will be matched based on DAI » * name alone.. » */ » if (link->cpus->name && link->cpus->of_node) { » » dev_err(card->dev, » » » "ASoC: Neither/both cpu name/of_node are set for %s\n", » » » link->name); » » return -EINVAL; » }
Here either the warning message is wrong OR the if () condition is wrong.
If the link->cpus->name = NULL && link->cpus->of_node == NULL the warning message will be not be printed.
It seems it was added by this patch
bc92657a11c0982783979bbb84ceaf58ba222124 ("ASoC: make snd_soc_dai_link more symmetrical")
it removes
- if (!!link->cpu_dai_name == !!link->cpu_dai_of_node) {
Thank you for your help !! Best regards --- Kuninori Morimoto
participants (2)
-
Daniel Baluta
-
Kuninori Morimoto