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

Unverified Commit 5b8e4c1c authored by Amadeusz Sławiński's avatar Amadeusz Sławiński Committed by Mark Brown
Browse files

ASoC: Intel: Skylake: Add function to cleanup debugfs interface



Currently debugfs has no cleanup function. Add skl_debufs_exit function
so we can clean after ourselves properly.

Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Reviewed-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 9f6115ac
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -259,3 +259,12 @@ struct skl_debug *skl_debugfs_init(struct skl *skl)
	debugfs_remove_recursive(d->fs);
	return NULL;
}

void skl_debugfs_exit(struct skl *skl)
{
	struct skl_debug *d = skl->debugfs;

	debugfs_remove_recursive(d->fs);

	d = NULL;
}
+5 −0
Original line number Diff line number Diff line
@@ -164,6 +164,7 @@ struct skl_module_cfg;

#ifdef CONFIG_DEBUG_FS
struct skl_debug *skl_debugfs_init(struct skl *skl);
void skl_debugfs_exit(struct skl *skl);
void skl_debug_init_module(struct skl_debug *d,
			struct snd_soc_dapm_widget *w,
			struct skl_module_cfg *mconfig);
@@ -172,6 +173,10 @@ static inline struct skl_debug *skl_debugfs_init(struct skl *skl)
{
	return NULL;
}

static inline void skl_debugfs_exit(struct skl *skl)
{}

static inline void skl_debug_init_module(struct skl_debug *d,
					 struct snd_soc_dapm_widget *w,
					 struct skl_module_cfg *mconfig)