summaryrefslogtreecommitdiff
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-09 13:20:36 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-09 13:20:36 +0400
commit71ae391d45bf5d983c3cdabfa83e2afa3c99c5ab (patch)
treec25cd59baf684faa4568e42d8b4ac785a43edd37 /sound/soc/soc-core.c
parentb5d5f59be2ac586db2db0ac324215a714961f364 (diff)
parent18361bbe3180eca62796188d62aefac1519f4c83 (diff)
downloadlinux-71ae391d45bf5d983c3cdabfa83e2afa3c99c5ab.tar.xz
Merge branch 'for-3.0' into for-3.1
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 70f477941892..e44267f66216 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1433,8 +1433,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
"%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 ? card->driver_name : card->name);
+ if (card->driver_name)
+ strlcpy(card->snd_card->driver, card->driver_name,
+ sizeof(card->snd_card->driver));
if (card->late_probe) {
ret = card->late_probe(card);