]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.0-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Feb 2012 01:09:35 +0000 (17:09 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 7 Feb 2012 01:09:35 +0000 (17:09 -0800)
added patches:
asoc-ensure-we-generate-a-driver-name.patch

queue-3.0/asoc-ensure-we-generate-a-driver-name.patch [new file with mode: 0644]
queue-3.0/series

diff --git a/queue-3.0/asoc-ensure-we-generate-a-driver-name.patch b/queue-3.0/asoc-ensure-we-generate-a-driver-name.patch
new file mode 100644 (file)
index 0000000..440aeb6
--- /dev/null
@@ -0,0 +1,56 @@
+From f0e8ed858edb327802ee65fd695cc1538286226f Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Date: Tue, 20 Sep 2011 11:41:54 +0100
+Subject: ASoC: Ensure we generate a driver name
+
+From: Mark Brown <broonie@opensource.wolfsonmicro.com>
+
+commit f0e8ed858edb327802ee65fd695cc1538286226f upstream.
+
+Commit 873bd4c (ASoC: Don't set invalid name string to snd_card->driver
+field) broke generation of a driver name for all ASoC cards relying on the
+automatic generation of one. Fix this by using the old default with spaces
+replaced by underscores.
+
+Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
+Acked-by: Takashi Iwai <tiwai@suse.de>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ sound/soc/soc-core.c |   18 +++++++++++++++---
+ 1 file changed, 15 insertions(+), 3 deletions(-)
+
+--- a/sound/soc/soc-core.c
++++ b/sound/soc/soc-core.c
+@@ -30,6 +30,7 @@
+ #include <linux/bitops.h>
+ #include <linux/debugfs.h>
+ #include <linux/platform_device.h>
++#include <linux/ctype.h>
+ #include <linux/slab.h>
+ #include <sound/ac97_codec.h>
+ #include <sound/core.h>
+@@ -1931,9 +1932,20 @@ static void snd_soc_instantiate_card(str
+                "%s", card->name);
+       snprintf(card->snd_card->longname, sizeof(card->snd_card->longname),
+                "%s", card->long_name ? card->long_name : card->name);
+-      if (card->driver_name)
+-              strlcpy(card->snd_card->driver, card->driver_name,
+-                      sizeof(card->snd_card->driver));
++      snprintf(card->snd_card->driver, sizeof(card->snd_card->driver),
++               "%s", card->driver_name ? card->driver_name : card->name);
++      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) {
+               ret = card->late_probe(card);
index 9024a5e65b718f161964d386ec3984d09f604e3a..616d43869284b9ceeb113325b46a998fc1e48df6 100644 (file)
@@ -21,3 +21,4 @@ drm-radeon-set-desktop_height-register-to-the-framebuffer-not-mode-height.patch
 drm-nouveau-gem-fix-fence_sync-race-oops.patch
 drm-radeon-kms-disable-output-polling-when-suspended.patch
 sched-rt-fix-task-stack-corruption-under-__arch_want_interrupts_on_ctxsw.patch
+asoc-ensure-we-generate-a-driver-name.patch