alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/4] ASoC: soc core move the card debugfs initialization
@ 2011-01-13 17:18 Koul, Vinod
  0 siblings, 0 replies; only message in thread
From: Koul, Vinod @ 2011-01-13 17:18 UTC (permalink / raw)
  To: alsa-devel; +Cc: Vinod Koul, Harsha Priya, broonie, selma.bensaid, lrg

From: Vinod Koul <vinod.koul@intel.com>

The card debugfs initialization is done in soc_probe but would be better if it
is done when the card in registered

This patch moves the debugfs initialization to register_card()

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Harsha Priya <harsha.priya@intel.com>
---
 sound/soc/soc-core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 318c3a7..9c5e7cf 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -1879,8 +1879,6 @@ static int soc_probe(struct platform_device *pdev)
 	INIT_LIST_HEAD(&card->paths);
 	INIT_LIST_HEAD(&card->dapm_list);
 
-	soc_init_card_debugfs(card);
-
 	ret = snd_soc_register_card(card);
 	if (ret != 0) {
 		dev_err(&pdev->dev, "Failed to register card\n");
@@ -3123,6 +3121,8 @@ static int snd_soc_register_card(struct snd_soc_card *card)
 	if (!card->name || !card->dev)
 		return -EINVAL;
 
+	soc_init_card_debugfs(card);
+
 	card->rtd = kzalloc(sizeof(struct snd_soc_pcm_runtime) *
 			    (card->num_links + card->num_aux_devs),
 			    GFP_KERNEL);
-- 
1.7.2.3

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-01-13 17:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-13 17:18 [PATCH 2/4] ASoC: soc core move the card debugfs initialization Koul, Vinod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).