Skip to content

Commit a1c99b6

Browse files
morimotobroonie
authored andcommitted
ASoC: soc-component: add snd_soc_component_to_dapm()
Because struct snd_soc_dapm_context is soc-dapm framework specific, user driver don't need to access its member directly, we would like to hide them. struct snd_soc_dapm_context will be removed from header in the future. Current dapm of card/component are using "instance", but it will be "pointer" if snd_soc_dapm_context was removed from header. snd_soc_component_to_dapm() is needed to switch to the new style while maintaining compatibility Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/878qiux06m.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent 96e311b commit a1c99b6

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

include/sound/soc-component.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -261,16 +261,19 @@ struct snd_soc_component {
261261
list_for_each_entry_safe(dai, _dai, &(component)->dai_list, list)
262262

263263
/**
264-
* snd_soc_component_get_dapm() - Returns the DAPM context associated with a
264+
* snd_soc_component_to_dapm() - Returns the DAPM context associated with a
265265
* component
266266
* @component: The component for which to get the DAPM context
267267
*/
268-
static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
268+
static inline struct snd_soc_dapm_context *snd_soc_component_to_dapm(
269269
struct snd_soc_component *component)
270270
{
271271
return &component->dapm;
272272
}
273273

274+
// FIXME
275+
#define snd_soc_component_get_dapm snd_soc_component_to_dapm
276+
274277
/**
275278
* snd_soc_component_cache_sync() - Sync the register cache with the hardware
276279
* @component: COMPONENT to sync

0 commit comments

Comments
 (0)