Skip to contentSkip to conversation

ASoC: Improve the debugfs hierarchy

PATCH Applied Peter Ujfalusi 2 participants 2 messages Oct 2, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: Improve the debugfs hierarchy

Change the way the debugfs entries are created:
If the codec->dev is valid, than use:
debugfs/asoc/{codec->name}.{dev_name(codec->dev)}/

if the codec->dev is NULL:
debugfs/asoc/{codec->name}/

as root for the debugfs entries.

---

The patch applies on top of sound-2.6 topic/asoc commit 88439ac793934a47f47ad285656b63d09f5937c8
ASoC: add support for multiple cards/codecs in debugfs

 sound/soc/soc-core.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
sound/soc/soc-core.c +6 -2
index e4ab36d..1dec9d2 100644
@@ -1256,8 +1256,12 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
 {
 	char codec_root[128];
 
-	snprintf(codec_root, sizeof(codec_root),
-		 "%s-%s", dev_name(codec->socdev->dev), codec->name);
+	if (codec->dev)
+		snprintf(codec_root, sizeof(codec_root),
+			"%s.%s", codec->name, dev_name(codec->dev));
+	else
+		snprintf(codec_root, sizeof(codec_root),
+			"%s", codec->name);
 
 	codec->debugfs_codec_root = debugfs_create_dir(codec_root,
 						       debugfs_root);

--
1.6.5.rc2

Applied
#1 lore raw
Quoted 8 lines · Peter Ujfalusi

Change the way the debugfs entries are created:
If the codec->dev is valid, than use:
debugfs/asoc/{codec->name}.{dev_name(codec->dev)}/

if the codec->dev is NULL:
debugfs/asoc/{codec->name}/

as root for the debugfs entries.

Applied, thanks.