summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2015-05-12 20:31:32 +0100
committerMark Brown <broonie@kernel.org>2015-05-12 20:31:32 +0100
commit12a04231496502ab5950c8847e9cf0a28cbca1ad (patch)
tree547e64eab6bc6991a73576c55f223e435048726f /sound/soc
parent030bbdbf4c833bc69f502eae58498bc5572db736 (diff)
parentfdb6eb0a12871d5bfaf266c5a0d5259a5437a72f (diff)
downloadlinux-stable-12a04231496502ab5950c8847e9cf0a28cbca1ad.tar.gz
linux-stable-12a04231496502ab5950c8847e9cf0a28cbca1ad.tar.bz2
linux-stable-12a04231496502ab5950c8847e9cf0a28cbca1ad.zip
Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-dapm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sound/soc/soc-dapm.c b/sound/soc/soc-dapm.c
index defe0f0082b5..158204d08924 100644
--- a/sound/soc/soc-dapm.c
+++ b/sound/soc/soc-dapm.c
@@ -3100,11 +3100,16 @@ snd_soc_dapm_new_control(struct snd_soc_dapm_context *dapm,
}
prefix = soc_dapm_prefix(dapm);
- if (prefix)
+ if (prefix) {
w->name = kasprintf(GFP_KERNEL, "%s %s", prefix, widget->name);
- else
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s %s", prefix,
+ widget->sname);
+ } else {
w->name = kasprintf(GFP_KERNEL, "%s", widget->name);
-
+ if (widget->sname)
+ w->sname = kasprintf(GFP_KERNEL, "%s", widget->sname);
+ }
if (w->name == NULL) {
kfree(w);
return NULL;