提交 0757d834 编写于 作者: L Lars-Peter Clausen 提交者: Mark Brown

ASoC: Create card debugfs directory earlier

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: 4e2576bd ("ASoC: soc-core: initialize debugfs in snd_soc_instantiate_card()")
Reported-by: NFabio Estevam <festevam@gmail.com>
Reported-by: NNicolin Chen <nicoleotsuka@gmail.com>
Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: NMark Brown <broonie@kernel.org>
上级 95a9ca74
......@@ -1559,6 +1559,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;
......@@ -1680,8 +1682,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:
......@@ -1695,6 +1695,7 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card)
if (card->remove)
card->remove(card);
soc_cleanup_card_debugfs(card);
snd_card_free(card->snd_card);
base_error:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册