diff options
author | Mark Brown <broonie@kernel.org> | 2022-04-06 14:23:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2022-04-06 14:23:46 +0100 |
commit | 89bac792faf03fae5a9564bebfaacab53a029932 (patch) | |
tree | bad17faa1b6cb59eb01230d0a5e9eb9de07133c3 /sound/soc/soc-core.c | |
parent | e927b05f3cc20de87f6b7d912a5bbe556931caca (diff) | |
parent | fc35880d198d9f2023bf231c120e1a69ad4db841 (diff) |
ASoC: meson: aiu: fix duplicate debugfs directory error
Merge series from Heiner Kallweit <hkallweit1@gmail.com>:
On a S905W-based system I get the following error:
debugfs: Directory 'c1105400.audio-controller' with parent 'P230-Q200' already present!
Turned out that multiple components having the same name triggers this
error in soc_init_component_debugfs(). The proposed solution allows
other drivers to adopt the same approach with minimal effort.
With the patch the error is gone and that's the debugfs entries.
/sys/kernel/debug/asoc/P230-Q200/acodec:c1105400.audio-controller
/sys/kernel/debug/asoc/P230-Q200/hdmi:c1105400.audio-controller
/sys/kernel/debug/asoc/P230-Q200/cpu:c1105400.audio-controller
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index ce153ac2c3ab..8c7da82a62ca 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -2587,6 +2587,11 @@ int snd_soc_component_initialize(struct snd_soc_component *component, component->dev = dev; component->driver = driver; +#ifdef CONFIG_DEBUG_FS + if (!component->debugfs_prefix) + component->debugfs_prefix = driver->debugfs_prefix; +#endif + return 0; } EXPORT_SYMBOL_GPL(snd_soc_component_initialize); |