[PATCH 2/2] ASoC: multi-component - Fix ".-1" removal from device name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Function fmt_single_name returns empty name if device name is
"driver-name.-1".

Signed-off-by: Jarkko Nikula <jhnikula@xxxxxxxxx>
---
Liam. This is a trivial fix. No need for separate patch, just embed to your
next multi-component update. Do we even have a case where name is "foo-bar.-1"?
---
 sound/soc/soc-core.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 300a9b3..db7ea1b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2807,7 +2807,7 @@ static inline char *fmt_single_name(struct device *dev, int *id)
 
 			/* discard ID from name if ID == -1 */
 			if (*id == -1)
-				*found = '\0';
+				found[strlen(dev->driver->name)] = '\0';
 		}
 
 	} else {
-- 
1.7.1

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux