diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2013-03-21 03:27:13 -0700 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-03-26 21:55:21 +0000 |
commit | a1422b8cb443c6cfc58da38394673b8b8eda6458 (patch) | |
tree | d668870bd2748d2abfe52658b4baa2349ae9ce1d | |
parent | 995f297298f2337a5f9794271dc225d17cdb2c15 (diff) | |
download | linux-a1422b8cb443c6cfc58da38394673b8b8eda6458.tar.bz2 |
ASoC: snd_soc_register_component() uses properly snd_soc_register_dai[s]()
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>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | sound/soc/soc-core.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 9e6118573fef..2ecaaf13e319 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -4169,7 +4169,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; |