ASoC: intel: avs: probes: use snd_soc_register_component()

It is calling snd_soc_component_initialize() / snd_soc_add_component().
We can now use snd_soc_register_component() instead.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/87o6fyrz7h.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2026-07-23 06:34:43 +00:00 committed by Mark Brown
parent 6105b0c10c
commit 8255216645
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -296,19 +296,19 @@ static const struct snd_soc_component_driver avs_probe_component_driver = {
int avs_register_probe_component(struct avs_dev *adev, const char *name)
{
struct snd_soc_component *component;
int ret;
const char *comp_name;
component = devm_kzalloc(adev->dev, sizeof(*component), GFP_KERNEL);
component = snd_soc_component_alloc(adev->dev);
if (!component)
return -ENOMEM;
component->name = devm_kstrdup(adev->dev, name, GFP_KERNEL);
if (!component->name)
comp_name = devm_kstrdup(adev->dev, name, GFP_KERNEL);
if (!comp_name)
return -ENOMEM;
ret = snd_soc_component_initialize(component, &avs_probe_component_driver, adev->dev);
if (ret)
return ret;
snd_soc_component_set_name(component, comp_name);
return snd_soc_add_component(component, probe_cpu_dais, ARRAY_SIZE(probe_cpu_dais));
return snd_soc_register_component(component,
&avs_probe_component_driver,
probe_cpu_dais, ARRAY_SIZE(probe_cpu_dais));
}