diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2015-03-24 12:01:00 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-03-24 20:48:56 +0300 |
commit | 4e2576bd36a12e78ac3786d05b99a820dffe687f (patch) | |
tree | 44c1484139d6f14eccf84f5aa1ca73bb711393cb /sound/soc/soc-core.c | |
parent | 778952598e53f09251bebe1655177b355cd9e836 (diff) | |
download | linux-4e2576bd36a12e78ac3786d05b99a820dffe687f.tar.xz |
ASoC: soc-core: initialize debugfs in snd_soc_instantiate_card()
Current soc_init_card_debugfs() is called from snd_soc_register_card()
but, soc_cleanup_card_debugfs() is called from soc_cleanup_card_resources(),
not from paired function.
This differences don't matter for now. But if anyone wants to implement
a proper hotplug/unplug, this difference would become clearer.
Now, we can assume that snd_soc_instantiate_card() and
soc_cleanup_card_resources() are paired function.
soc_init_card_debugfs() / soc_cleanup_card_debugfs() paired function
should be called from these.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r-- | sound/soc/soc-core.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index acf99f1250e5..4443581d69f2 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -1662,6 +1662,8 @@ static int snd_soc_instantiate_card(struct snd_soc_card *card) snd_soc_dapm_sync(&card->dapm); mutex_unlock(&card->mutex); + soc_init_card_debugfs(card); + return 0; probe_aux_dev_err: @@ -2352,8 +2354,6 @@ int snd_soc_register_card(struct snd_soc_card *card) snd_soc_initialize_card_lists(card); - soc_init_card_debugfs(card); - card->rtd = devm_kzalloc(card->dev, sizeof(struct snd_soc_pcm_runtime) * (card->num_links + card->num_aux_devs), @@ -2384,7 +2384,7 @@ int snd_soc_register_card(struct snd_soc_card *card) ret = snd_soc_instantiate_card(card); if (ret != 0) - soc_cleanup_card_debugfs(card); + return ret; /* deactivate pins to sleep state */ for (i = 0; i < card->num_rtd; i++) { |