]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-core: merge card resources cleanup method
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Mon, 21 Jan 2019 00:32:42 +0000 (09:32 +0900)
committerMark Brown <broonie@kernel.org>
Mon, 21 Jan 2019 18:13:18 +0000 (18:13 +0000)
commit64030b902206666cf80e1ecb54cb1b9c2439bbfe
tree16c7e85335b168817fb829f96bd5e3467766a59b
parentc4d8baf35eac4cd088d9e498488e65f5ba2aaf48
ASoC: soc-core: merge card resources cleanup method

We need to cleanup card resources when snd_soc_instantiate_card() was
failed, or when snd_soc_unbind_card() was called.
But they are cleanuping card resources on each way.
Same code in many places makes code un-understandable.

This patch reuses soc_cleanup_card_resources() for cleanuping code
resource. Then, it makes avoiding cleanup order.
It will be called from snd_soc_instantiate_card() and
snd_soc_unbind_card().

Then, original soc_cleanup_card_resources() included
snd_soc_flush_all_delayed_work(), but it is now separated.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c