snd_soc_register_dai() uses fmt_single_name(), and snd_soc_register_dais() uses fmt_multiple_name() for dai->name which is used for name based matching. This patch uses properly snd_soc_register_dai() it it was single driver, and uses snd_register_dais() if it were multiple drivers.
Signed-off-by: Kuninori Morimoto kuninori.morimoto.gx@renesas.com ---
If this patch was OK, I will re-send "switch over" patch set
sound/soc/soc-core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 27ae7ee..f6cda7b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4165,7 +4165,15 @@ int snd_soc_register_component(struct device *dev, cmpnt->driver = cmpnt_drv; cmpnt->num_dai = num_dai;
- ret = snd_soc_register_dais(dev, dai_drv, num_dai); + /* + * snd_soc_register_dai() uses fmt_single_name(), and + * snd_soc_register_dais() uses fmt_multiple_name() + * for dai->name which is used for name based matching + */ + if (1 == num_dai) + ret = snd_soc_register_dai(dev, dai_drv); + else + ret = snd_soc_register_dais(dev, dai_drv, num_dai); if (ret < 0) { dev_err(dev, "ASoC: Failed to regster DAIs: %d\n", ret); goto error_component_name;