浏览代码

Merge remote-tracking branch 'asoc/fix/dapm' into asoc-linus

Mark Brown 10 年之前
父节点
当前提交
12a0423149
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      sound/soc/soc-dapm.c

+ 8 - 3
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;