diff options
| author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2026-07-23 06:34:27 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-08-05 00:39:27 +0100 |
| commit | 3e53dc96a007a40ee9a8b24e5884aa216381964a (patch) | |
| tree | 5706e7db77b0fa41e68d97edc7003da7b0fa83ae /tools/perf/scripts/python | |
| parent | de182d84b3a73f93fbd524843bcf6987bae76120 (diff) | |
ASoC: soc-component: add snd_soc_register_component_{c/d}()
We have snd_soc_register_component() (A), but we can't setup component
specific setting, like name, etc from driver, because component
itself is allocated in that function (x).
(A) int snd_soc_register_component(...)
{
...
(x) component = devm_kzalloc(...);
if (!component)
return -ENOMEM;
(B) ret = snd_soc_component_initialize(...);
if (ret < 0)
return ret;
(C) return snd_soc_add_component(...);
}
So each driver needs to use snd_soc_component_{initialize/add}() (= B/C)
instead of using snd_soc_register_component() (A), but it looks
unbalanced with its paired unregiser function.
Let's merge (B) and (C) into new register function, and allows component
as parameter. We can use both
snd_soc_register_component(dev, ...); // already exists
snd_soc_register_component(component, ...); // new function
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/87tspqrz7w.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
