[alsa-devel] [PATCH 3/4] 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:52:29 CET 2015


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

soc_cleanup_card_debugfs() is called from soc_cleanup_card_resources(),
but, card debugfs is called from snd_soc_register_card().
cleanup function should be called 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 794d8ec..b7ab676 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1729,8 +1729,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);
@@ -2403,6 +2401,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