Skip to content

Commit

Permalink
ASoC: Improve the debugfs hierarchy
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Mark Brown committed Oct 2, 2009
1 parent 88439ac commit ce3e373
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit ce3e373

Please sign in to comment.