ASoC: add snd_soc_of_get_dai_name() default of_xlate

Current snd_soc_of_get_dai_name() needs .of_xlate_dai_name()
callback on each component drivers.
But required behavior on almost all these drivers is
just returns its indexed driver's name.

This patch adds this feature as default behavior.
.of_xlate_dai_name() can overwrite it.

Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
This commit is contained in:
Kuninori Morimoto 2013-10-16 22:05:26 -07:00 • committed by Mark Brown
commit 6833c452c2
2 changed files with 27 additions and 5 deletions

View file

@ -644,10 +644,12 @@ struct snd_soc_component_driver {
struct snd_soc_component {
const char *name;
int id;
int num_dai;
struct device *dev;
struct list_head list;
struct snd_soc_dai_driver *dai_drv;
int num_dai;
const struct snd_soc_component_driver *driver;
};