summaryrefslogtreecommitdiffstats
path: root/sound/soc
diff options
context:
space:
mode:
authorMark Brown2010-08-12 16:44:04 +0200
committerMark Brown2010-08-15 15:50:16 +0200
commit13cb61f8c261ca6a218f83f4ee9c3bd5cfc223a5 (patch)
tree50372278ce3f2cde8dabe7f58f4eda028b98e5c0 /sound/soc
parentASoC: Remove unused driver data from WM8961 probe (diff)
downloadkernel-qcow2-linux-13cb61f8c261ca6a218f83f4ee9c3bd5cfc223a5.tar.gz
kernel-qcow2-linux-13cb61f8c261ca6a218f83f4ee9c3bd5cfc223a5.tar.xz
kernel-qcow2-linux-13cb61f8c261ca6a218f83f4ee9c3bd5cfc223a5.zip
ASoC: Set up debugfs only once per CODEC
Since the debugfs directory is current per CODEC we should only init it when the CODEC is initialised, otherwise we end up with errors being generated when an attempt is made to add duplicate debugfs entries. Since most of this stuff is actually for the card we should refactor but this can come later. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/soc-core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a004876a39a9..ac0fa228c7b3 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1323,6 +1323,9 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
return ret;
}
}
+
+ soc_init_codec_debugfs(codec);
+
/* mark codec as probed and add to card codec list */
codec->probed = 1;
list_add(&codec->card_list, &card->codec_dev_list);
@@ -1400,8 +1403,6 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
if (ret < 0)
printk(KERN_WARNING "asoc: failed to add codec sysfs files\n");
- soc_init_codec_debugfs(codec);
-
/* create the pcm */
ret = soc_new_pcm(rtd, num);
if (ret < 0) {