mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
ASoC: core: Rename and export soc_component_add()
To keep the register/unregister pattern intact, rename to the function before exporting it. This concludes the registration update, leaving the following two options available to the callers: 1) snd_soc_component_register(component..) 2) snd_soc_register_component(dev..) A driver uses 1) when attempting to register a pre-constructed component object explicitly and 2) when they want the ASoC framework to do the entire job for them. Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20261007133353.455185-3-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
0f2bec6921
commit
4e2db62172
|
|
@ -294,6 +294,9 @@ static inline int snd_soc_component_cache_sync(
|
|||
|
||||
struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *name,
|
||||
const struct snd_soc_component_driver *driver);
|
||||
int snd_soc_component_register(struct snd_soc_component *component,
|
||||
struct snd_soc_dai_driver *dai_drv,
|
||||
int num_dai);
|
||||
struct snd_soc_component *snd_soc_component_alloc(struct device *dev);
|
||||
|
||||
void snd_soc_component_set_name(struct snd_soc_component *component, const char *name);
|
||||
|
|
|
|||
|
|
@ -2625,9 +2625,9 @@ struct snd_soc_component *snd_soc_component_new(struct device *dev, const char *
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_component_new);
|
||||
|
||||
static int soc_component_add(struct snd_soc_component *component,
|
||||
struct snd_soc_dai_driver *dai_drv,
|
||||
int num_dai)
|
||||
int snd_soc_component_register(struct snd_soc_component *component,
|
||||
struct snd_soc_dai_driver *dai_drv,
|
||||
int num_dai)
|
||||
{
|
||||
struct snd_soc_card *card, *c;
|
||||
int ret;
|
||||
|
|
@ -2666,6 +2666,7 @@ static int soc_component_add(struct snd_soc_component *component,
|
|||
|
||||
return ret;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_component_register);
|
||||
|
||||
int snd_soc_register_component_c(struct snd_soc_component *component,
|
||||
const struct snd_soc_component_driver *component_driver,
|
||||
|
|
@ -2678,7 +2679,7 @@ int snd_soc_register_component_c(struct snd_soc_component *component,
|
|||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
return soc_component_add(component, dai_drv, num_dai);
|
||||
return snd_soc_component_register(component, dai_drv, num_dai);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_register_component_c);
|
||||
|
||||
|
|
@ -2693,7 +2694,7 @@ int snd_soc_register_component_d(struct device *dev,
|
|||
if (IS_ERR(component))
|
||||
return PTR_ERR(component);
|
||||
|
||||
return soc_component_add(component, dai_drv, num_dai);
|
||||
return snd_soc_component_register(component, dai_drv, num_dai);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_soc_register_component_d);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user