summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>2026-07-23 06:34:46 +0000
committerMark Brown <broonie@kernel.org>2026-08-05 00:39:32 +0100
commitc8eaeedcace341eedc712f97aeee3aeb0c9b9f47 (patch)
tree38b31e5ba1035f2c683e3dfcabeca5cdba41e9cc
parent82552166455946c95d87fe813789cdd9689008e8 (diff)
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>
-rw-r--r--sound/soc/intel/catpt/pcm.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/sound/soc/intel/catpt/pcm.c b/sound/soc/intel/catpt/pcm.c
index f23c580ba051..bbba0d959ea2 100644
--- a/sound/soc/intel/catpt/pcm.c
+++ b/sound/soc/intel/catpt/pcm.c
@@ -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));
}