]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: wm_adsp: Put debugfs_remove_recursive back in
authorCharles Keepax <ckeepax@opensource.cirrus.com>
Tue, 24 Aug 2021 10:15:52 +0000 (11:15 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 24 Aug 2021 18:12:39 +0000 (19:12 +0100)
commite4ae0cc522bc1e2f282655475f3f191800ed0708
tree2384f423b712a83591f674e2cd73ada4bac9d5c3
parenta8f10bb23b59784ca617f1bd0eae620ea09abeb2
ASoC: wm_adsp: Put debugfs_remove_recursive back in

This patch reverts commit 6d523d40d96d ("ASoC: wm_adsp: Let
soc_cleanup_component_debugfs remove debugfs"), and adds an
alternate solution to the issue. That patch removes the call to
debugfs_remove_recursive, which cleans up the DSPs debugfs. The
intention was to avoid an unbinding issue on an out of tree
driver/platform.

The issue with the patch is it means the driver no longer cleans up
its own debugfs, instead relying on ASoC to remove recurive on the
parent debugfs node. This is conceptually rather unclean, but also it
would prevent DSPs being added/removed independently of ASoC and soon
we are going to be upstreaming some non-audio parts with these DSPs,
which will require this.

Finally, it seems the issue on the platform is a result of the
wm_adsp2_cleanup_debugfs getting called twice. This is very likely a
problem on the platform side and will be resolved there. But in the mean
time make the code a little more robust to such issues, and again
conceptually a bit nicer, but clearing the debugfs_root variable in the
DSP structure when the debugfs is removed.

Fixes: 6d523d40d96d ("ASoC: wm_adsp: Let soc_cleanup_component_debugfs remove debugfs"
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Link: https://lore.kernel.org/r/20210824101552.1119-1-ckeepax@opensource.cirrus.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm_adsp.c