]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: soc-core: add snd_soc_del_component_unlocked()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 5 Nov 2019 06:46:39 +0000 (15:46 +0900)
committerMark Brown <broonie@kernel.org>
Tue, 5 Nov 2019 23:50:18 +0000 (23:50 +0000)
commitc11bfb74108312d43719d0dfabd5c6f02b82b26a
tree567924ab01710e32e5c7fa22f105a0dc58f5430c
parentac1c153bc3a472dec9a0ba5c33b4837819606261
ASoC: soc-core: add snd_soc_del_component_unlocked()

It is easy to read code if it is cleanly using paired function/naming,
like start <-> stop, register <-> unregister, etc, etc.
But, current ALSA SoC code is very random, unbalance, not paired, etc.
It is easy to create bug at the such code, and is difficult to debug.

Now ALSA SoC has snd_soc_add_component(), but there is no paired
snd_soc_del_component(). Thus, snd_soc_unregister_component() is
calling cleanup function randomly. it is difficult to read.
This patch adds missing snd_soc_del_component_unlocked() and
balance up code.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/8736f23jn4.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/soc-core.c