Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: meson: aiu: fix duplicate debugfs directory error

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(). 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

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/38053baf-c33b-7fdf-7593-99b22153a9c0@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Heiner Kallweit and committed by
Mark Brown
fc35880d d462f6ed

+9
+3
sound/soc/meson/aiu-acodec-ctrl.c
··· 193 193 .of_xlate_dai_name = aiu_acodec_of_xlate_dai_name, 194 194 .endianness = 1, 195 195 .non_legacy_dai_naming = 1, 196 + #ifdef CONFIG_DEBUG_FS 197 + .debugfs_prefix = "acodec", 198 + #endif 196 199 }; 197 200 198 201 int aiu_acodec_ctrl_register_component(struct device *dev)
+3
sound/soc/meson/aiu-codec-ctrl.c
··· 140 140 .of_xlate_dai_name = aiu_hdmi_of_xlate_dai_name, 141 141 .endianness = 1, 142 142 .non_legacy_dai_naming = 1, 143 + #ifdef CONFIG_DEBUG_FS 144 + .debugfs_prefix = "hdmi", 145 + #endif 143 146 }; 144 147 145 148 int aiu_hdmi_ctrl_register_component(struct device *dev)
+3
sound/soc/meson/aiu.c
··· 103 103 .pointer = aiu_fifo_pointer, 104 104 .probe = aiu_cpu_component_probe, 105 105 .remove = aiu_cpu_component_remove, 106 + #ifdef CONFIG_DEBUG_FS 107 + .debugfs_prefix = "cpu", 108 + #endif 106 109 }; 107 110 108 111 static struct snd_soc_dai_driver aiu_cpu_dai_drv[] = {