Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ce3e3737 authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Mark Brown
Browse files

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: default avatarPeter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 88439ac7
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -1256,8 +1256,12 @@ static void soc_init_codec_debugfs(struct snd_soc_codec *codec)
{
{
	char codec_root[128];
	char codec_root[128];


	if (codec->dev)
		snprintf(codec_root, sizeof(codec_root),
		snprintf(codec_root, sizeof(codec_root),
		 "%s-%s", dev_name(codec->socdev->dev), codec->name);
			"%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,
	codec->debugfs_codec_root = debugfs_create_dir(codec_root,
						       debugfs_root);
						       debugfs_root);