[alsa-devel] [PATCH 5/6] ASoC: soc-core: call soc_cleanup_card_debugfs() from snd_soc_unregister_card()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Mon Feb 9 09:07:12 CET 2015


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

soc_cleanup_card_debugfs() is called from soc_cleanup_card_resources(),
but, it is registered in snd_soc_register_card().
Cleanup function should be called from paired function.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/soc-core.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index db7b070..eb16b44 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1719,8 +1719,6 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
 	/* remove and free each DAI */
 	soc_remove_dai_links(card);
 
-	soc_cleanup_card_debugfs(card);
-
 	/* remove the card */
 	if (card->remove)
 		card->remove(card);
@@ -2393,6 +2391,8 @@ int snd_soc_unregister_card(struct snd_soc_card *card)
 {
 	if (card->instantiated) {
 		snd_soc_remove_card(card);
+		soc_cleanup_card_debugfs(card);
+
 		dev_dbg(card->dev, "ASoC: Unregistered card '%s'\n",
 			card->name);
 	}
-- 
1.7.9.5



More information about the Alsa-devel mailing list