提交 22de71ba 编写于 作者: L Liam Girdwood 提交者: Mark Brown

ASoC: core - allow ASoC more flexible machine name

Allow ASoC machine drivers to register a driver name
and a longname. This allows user space to determine
the flavour of machine driver.
Signed-off-by: NLiam Girdwood <lrg@ti.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 9e53d856
...@@ -702,6 +702,8 @@ struct snd_soc_aux_dev { ...@@ -702,6 +702,8 @@ struct snd_soc_aux_dev {
/* SoC card */ /* SoC card */
struct snd_soc_card { struct snd_soc_card {
const char *name; const char *name;
const char *long_name;
const char *driver_name;
struct device *dev; struct device *dev;
struct snd_card *snd_card; struct snd_card *snd_card;
struct module *owner; struct module *owner;
......
...@@ -1928,7 +1928,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) ...@@ -1928,7 +1928,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname), snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname),
"%s", card->name); "%s", card->name);
snprintf(card->snd_card->longname, sizeof(card->snd_card->longname), snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
"%s", card->name); "%s", card->long_name ? card->long_name : card->name);
snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
"%s", card->driver_name);
if (card->late_probe) { if (card->late_probe) {
ret = card->late_probe(card); ret = card->late_probe(card);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册