summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2025-05-12 02:33:16 +0000
committerMark Brown <broonie@kernel.org>2025-05-12 21:09:44 +0900
commit144d6dfc7482455eabf8e8caa974a6e8d9572705 (patch)
tree930996066542110061106f8c9e0bc32e903b444b /tools/perf/scripts/python/export-to-sqlite.py
parent321f9db5563e1a6c89546b19bd031269aa3f17b8 (diff)
ASoC: soc-core: merge snd_soc_unregister_component() and snd_soc_unregister_component_by_driver()
We have below 2 functions, but these are very similar (A) snd_soc_unregister_component_by_driver() (B) snd_soc_unregister_component() (A) void snd_soc_unregister_component_by_driver(...) { ... (a) mutex_lock(&client_mutex); ^ (X) component = snd_soc_lookup_component_nolocked(dev, component_driver->name); | if (!component) ^^^^^^^^^^^^^^^^^^^^^^ | goto out; (b) | snd_soc_del_component_unlocked(component); v out: (c) mutex_unlock(&client_mutex); } (B) void snd_soc_unregister_component_by_driver(...) { (a) mutex_lock(&client_mutex); ^ while (1) { | (X) struct snd_soc_component *component = snd_soc_lookup_component_nolocked(dev, NULL); | ^^^^ (b) if (!component) | break; | | snd_soc_del_component_unlocked(component); v } (c) mutex_unlock(&client_mutex); } Both are calling lock (a), find component and remove it (b), and unlock (c). The big diff is whether use driver name for lookup() or not (X). Merge these into snd_soc_unregister_component_by_driver() (B), and snd_soc_unregister_component_by_driver() (A) can be macro. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87h61qy2vn.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions