ASoC: intel: catpt: pcm: 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/87mrvirz7d.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:46 +00:00
committed by Mark Brown
parent 8255216645
commit c8eaeedcac

View File

@@ -1072,18 +1072,14 @@ int catpt_arm_stream_templates(struct catpt_dev *cdev)
int catpt_register_plat_component(struct catpt_dev *cdev)
{
struct snd_soc_component *component;
int ret;
component = devm_kzalloc(cdev->dev, sizeof(*component), GFP_KERNEL);
component = snd_soc_component_alloc(cdev->dev);
if (!component)
return -ENOMEM;
ret = snd_soc_component_initialize(component, &catpt_comp_driver,
cdev->dev);
if (ret)
return ret;
snd_soc_component_set_name(component, catpt_comp_driver.name);
component->name = catpt_comp_driver.name;
return snd_soc_add_component(component, dai_drivers,
ARRAY_SIZE(dai_drivers));
return snd_soc_register_component(component,
&catpt_comp_driver,
dai_drivers, ARRAY_SIZE(dai_drivers));
}