forked from luck/tmp_suning_uos_patched
ASoC: soc core move the card debugfs initialization
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> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
b0e264855c
commit
150dd2f8c4
@ -1879,8 +1879,6 @@ static int soc_probe(struct platform_device *pdev)
|
|||||||
INIT_LIST_HEAD(&card->paths);
|
INIT_LIST_HEAD(&card->paths);
|
||||||
INIT_LIST_HEAD(&card->dapm_list);
|
INIT_LIST_HEAD(&card->dapm_list);
|
||||||
|
|
||||||
soc_init_card_debugfs(card);
|
|
||||||
|
|
||||||
ret = snd_soc_register_card(card);
|
ret = snd_soc_register_card(card);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
dev_err(&pdev->dev, "Failed to register card\n");
|
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)
|
if (!card->name || !card->dev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
soc_init_card_debugfs(card);
|
||||||
|
|
||||||
card->rtd = kzalloc(sizeof(struct snd_soc_pcm_runtime) *
|
card->rtd = kzalloc(sizeof(struct snd_soc_pcm_runtime) *
|
||||||
(card->num_links + card->num_aux_devs),
|
(card->num_links + card->num_aux_devs),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
Loading…
Reference in New Issue
Block a user