All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Mark Brown <broonie@kernel.org>, Liam Girdwood <lgirdwood@gmail.com>
Cc: Nicolin Chen <nicoleotsuka@gmail.com>,
	alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
	Fabio Estevam <festevam@gmail.com>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: [PATCH 1/3] ASoC: Create card debugfs directory earlier
Date: Thu,  9 Apr 2015 10:52:36 +0200	[thread overview]
Message-ID: <1428569558-15883-1-git-send-email-lars@metafoo.de> (raw)

Create the card debugfs directory at the begining of the initilization
rather then the end as various steps in the initilization sequence will try
to register files and sub-directories in the card directory.

Fixes: 4e2576bd36a1 ("ASoC: soc-core: initialize debugfs in snd_soc_instantiate_card()")
Reported-by: Fabio Estevam <festevam@gmail.com>
Reported-by: Nicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
 sound/soc/soc-core.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 2801578..7bd1599 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1555,6 +1555,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
 		goto base_error;
 	}
 
+	soc_init_card_debugfs(card);
+
 	card->dapm.bias_level = SND_SOC_BIAS_OFF;
 	card->dapm.dev = card->dev;
 	card->dapm.card = card;
@@ -1684,8 +1686,6 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
 	mutex_unlock(&card->mutex);
 	mutex_unlock(&client_mutex);
 
-	soc_init_card_debugfs(card);
-
 	return 0;
 
 probe_aux_dev_err:
@@ -1699,6 +1699,7 @@ card_probe_error:
 	if (card->remove)
 		card->remove(card);
 
+	soc_cleanup_card_debugfs(card);
 	snd_card_free(card->snd_card);
 
 base_error:
-- 
1.8.0

             reply	other threads:[~2015-04-09  8:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-09  8:52 Lars-Peter Clausen [this message]
2015-04-09  8:52 ` [PATCH 2/3] ASoC: Make soc_dpcm_debugfs_add() non-fatal Lars-Peter Clausen
2015-04-09 10:44   ` Mark Brown
2015-04-09  8:52 ` [PATCH 3/3] ASoC: Don't try to register debugfs entries if the parent does not exist Lars-Peter Clausen
2015-04-09 11:24   ` Mark Brown
2015-04-09 10:24 ` [PATCH 1/3] ASoC: Create card debugfs directory earlier Mark Brown

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1428569558-15883-1-git-send-email-lars@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=festevam@gmail.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=lgirdwood@gmail.com \
    --cc=nicoleotsuka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.