Commit 92868de6 authored by Mark Brown's avatar Mark Brown

Merge branch 'for-3.1' into for-3.2

parents 7c81beb0 f0e8ed85
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/debugfs.h> #include <linux/debugfs.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/ctype.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <sound/ac97_codec.h> #include <sound/ac97_codec.h>
#include <sound/core.h> #include <sound/core.h>
...@@ -1432,9 +1433,20 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card) ...@@ -1432,9 +1433,20 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
"%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->long_name ? card->long_name : card->name); "%s", card->long_name ? card->long_name : card->name);
if (card->driver_name) snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
strlcpy(card->snd_card->driver, card->driver_name, "%s", card->driver_name ? card->driver_name : card->name);
sizeof(card->snd_card->driver)); for (i = 0; i < ARRAY_SIZE(card->snd_card->driver); i++) {
switch (card->snd_card->driver[i]) {
case '_':
case '-':
case '\0':
break;
default:
if (!isalnum(card->snd_card->driver[i]))
card->snd_card->driver[i] = '_';
break;
}
}
if (card->late_probe) { if (card->late_probe) {
ret = card->late_probe(card); ret = card->late_probe(card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment