Commit 8ad13cd
ASoC: soc-dapm.c: clean up debugfs for freed widget
When a widget is added to dapm via snd_soc_dapm_new_widgets,
dapm_debugfs_add_widget is also called to create a corresponding debugfs
file. However, when a widget is freed by snd_soc_dapm_free_widget, the
corresponding debugfs is not cleared. As a result, the freed widget is
still seen in the dapm directory.
This patch adds dapm_debugfs_free_widget to free the debugfs of a
specified widget, and it's called at snd_soc_dapm_free_widget to clean
up the debugfs for freed widget.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
Link: https://lore.kernel.org/r/20230526093150.22923-6-trevor.wu@mediatek.com
Signed-off-by: Mark Brown <broonie@kernel.org>1 parent c0e7390 commit 8ad13cd
1 file changed
+16
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2216 | 2216 | | |
2217 | 2217 | | |
2218 | 2218 | | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
2219 | 2229 | | |
2220 | 2230 | | |
2221 | 2231 | | |
| |||
2232 | 2242 | | |
2233 | 2243 | | |
2234 | 2244 | | |
| 2245 | + | |
| 2246 | + | |
| 2247 | + | |
| 2248 | + | |
2235 | 2249 | | |
2236 | 2250 | | |
2237 | 2251 | | |
| |||
2495 | 2509 | | |
2496 | 2510 | | |
2497 | 2511 | | |
| 2512 | + | |
| 2513 | + | |
2498 | 2514 | | |
2499 | 2515 | | |
2500 | 2516 | | |
| |||
0 commit comments