aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@nokia.com>2009-10-02 02:17:37 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-10-02 06:24:21 -0400
commitce3e3737a3361e0c7030f8598eec36bb82050de6 (patch)
treed685ea6de1475e3e1b80a662e62fda3f76898d89 /sound/soc/soc-core.c
parent88439ac793934a47f47ad285656b63d09f5937c8 (diff)
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. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index e4ab36daf3f7..1dec9d21c55e 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1256,8 +1256,12 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
1256{ 1256{
1257 char codec_root[128]; 1257 char codec_root[128];
1258 1258
1259 snprintf(codec_root, sizeof(codec_root), 1259 if (codec->dev)
1260 "%s-%s", dev_name(codec->socdev->dev), codec->name); 1260 snprintf(codec_root, sizeof(codec_root),
1261 "%s.%s", codec->name, dev_name(codec->dev));
1262 else
1263 snprintf(codec_root, sizeof(codec_root),
1264 "%s", codec->name);
1261 1265
1262 codec->debugfs_codec_root = debugfs_create_dir(codec_root, 1266 codec->debugfs_codec_root = debugfs_create_dir(codec_root,
1263 debugfs_root); 1267 debugfs_root);