ASoC: soc-component: move snd_soc_component_to_dapm() to soc-component.c

struct snd_soc_component will be capsuled soon, its member will not be
able to access from non soc-component.c.

Move snd_soc_component_to_dapm() to soc-component.c

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Alvin Šipraga <alvin.sipraga@analog.com>
Link: https://patch.msgid.link/87ecdtyolc.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Kuninori Morimoto 2026-10-14 02:59:11 +00:00 committed by Mark Brown
parent 8b1121c5df
commit 5c90483441
No known key found for this signature in database
GPG Key ID: 2FEF73B0B3D03889
2 changed files with 7 additions and 10 deletions

View File

@ -272,16 +272,7 @@ struct snd_soc_component {
snd_soc_dai_to_list(dai) != &(component)->dai_list; \
dai = _dai, _dai = snd_soc_dai_from_list(snd_soc_dai_to_list(_dai)->next))
/**
* snd_soc_component_to_dapm() - Returns the DAPM context associated with a
* component
* @component: The component for which to get the DAPM context
*/
static inline struct snd_soc_dapm_context *snd_soc_component_to_dapm(
struct snd_soc_component *component)
{
return component->dapm;
}
struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component *component);
/**
* snd_soc_component_cache_sync() - Sync the register cache with the hardware

View File

@ -49,6 +49,12 @@ void *snd_soc_component_to_priv(struct snd_soc_component *component)
}
EXPORT_SYMBOL_GPL(snd_soc_component_to_priv);
struct snd_soc_dapm_context *snd_soc_component_to_dapm(struct snd_soc_component *component)
{
return component->dapm;
}
EXPORT_SYMBOL_GPL(snd_soc_component_to_dapm);
/*
* We might want to check substream by using list.
* In such case, we can update these macros.