mirror of
https://github.com/torvalds/linux.git
synced 2026-09-23 05:04:02 +02:00
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:
parent
6105b0c10c
commit
8255216645
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user