summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorLiam Girdwood <lrg@ti.com>2011-05-12 16:14:04 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-05-12 17:40:03 +0200
commit22de71ba03311cdc1063757c50a1488cb90a1fca (patch)
tree34535f85da7635e47382db923136766511ba4c3c /sound/soc/soc-core.c
parent9e53d856af0db8acc8a1bc6a9e3298f6bbb8944b (diff)
downloadlwn-22de71ba03311cdc1063757c50a1488cb90a1fca.tar.gz
lwn-22de71ba03311cdc1063757c50a1488cb90a1fca.zip
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: Liam Girdwood <lrg@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a477e218aa28..c1a4cf480c72 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1926,9 +1926,11 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
card->num_dapm_routes);
snprintf(card->snd_card->shortname, sizeof(card->snd_card->shortname),
- "%s", card->name);
- snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
"%s", card->name);
+ snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
+ "%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) {
ret = card->late_probe(card);