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

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Fri Feb 13 05:43:40 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>
---
v3 -> v4

 - no change

 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 7f123bf..5d85b5b 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