summaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-06-28 13:55:22 +0100
committerMark Brown <broonie@linaro.org>2014-06-28 14:47:12 +0100
commit211bcc6c3af90f3ee1f1297349d9d692e5f1c7e0 (patch)
tree65f0b2a66235d26eb92c54bea0ddaf8006bcb451 /sound/soc/soc-core.c
parent88a8fe3df65fa0229b04f1c03411062230091cdd (diff)
parente73f3de5c5eb5285a1b1d8eed111eb229702b20f (diff)
downloadblackbird-op-linux-211bcc6c3af90f3ee1f1297349d9d692e5f1c7e0.tar.gz
blackbird-op-linux-211bcc6c3af90f3ee1f1297349d9d692e5f1c7e0.zip
Merge remote-tracking branch 'asoc/fix/debugfs' into asoc-component
Conflicts: sound/soc/soc-core.c
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c30
1 files changed, 26 insertions, 4 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 19c1e9588e05..72d4a2b009fa 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -270,12 +270,33 @@ static const struct file_operations codec_reg_fops = {
.llseek = default_llseek,
};
+static struct dentry *soc_debugfs_create_dir(struct dentry *parent,
+ const char *fmt, ...)
+{
+ struct dentry *de;
+ va_list ap;
+ char *s;
+
+ va_start(ap, fmt);
+ s = kvasprintf(GFP_KERNEL, fmt, ap);
+ va_end(ap);
+
+ if (!s)
+ return NULL;
+
+ de = debugfs_create_dir(s, parent);
+ kfree(s);
+
+ return de;
+}
+
static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
{
struct dentry *debugfs_card_root = codec->card->debugfs_card_root;
- codec->debugfs_codec_root = debugfs_create_dir(codec->component.name,
- debugfs_card_root);
+ codec->debugfs_codec_root = soc_debugfs_create_dir(debugfs_card_root,
+ "codec:%s",
+ codec->component.name);
if (!codec->debugfs_codec_root) {
dev_warn(codec->dev,
"ASoC: Failed to create codec debugfs directory\n");
@@ -306,8 +327,9 @@ static void soc_init_platform_debugfs(struct snd_soc_platform *platform)
{
struct dentry *debugfs_card_root = platform->card->debugfs_card_root;
- platform->debugfs_platform_root = debugfs_create_dir(
- platform->component.name, debugfs_card_root);
+ platform->debugfs_platform_root = soc_debugfs_create_dir(debugfs_card_root,
+ "platform:%s",
+ platform->component.name);
if (!platform->debugfs_platform_root) {
dev_warn(platform->dev,
"ASoC: Failed to create platform debugfs directory\n");
OpenPOWER on IntegriCloud