mirror of
https://github.com/torvalds/linux.git
synced 2026-11-06 21:58:01 +01:00
ASoC: soc-component: move component_list 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 component_list 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/87a4ohyol2.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
614749f16e
commit
8c186bc6b7
|
|
@ -31,6 +31,12 @@ static inline int _soc_component_ret_reg_rw(struct snd_soc_component *component,
|
|||
func, component->name, reg);
|
||||
}
|
||||
|
||||
static LIST_HEAD(component_list);
|
||||
struct list_head *snd_soc_component_get_list_head(void)
|
||||
{
|
||||
return &component_list;
|
||||
}
|
||||
|
||||
const char *snd_soc_component_name(struct snd_soc_component *component)
|
||||
{
|
||||
return component->name;
|
||||
|
|
|
|||
|
|
@ -47,13 +47,8 @@
|
|||
#include <trace/events/asoc.h>
|
||||
|
||||
DEFINE_MUTEX(client_mutex);
|
||||
|
||||
static LIST_HEAD(component_list);
|
||||
static LIST_HEAD(unbind_card_list);
|
||||
|
||||
#define for_each_component(component) \
|
||||
list_for_each_entry(component, &component_list, list)
|
||||
|
||||
/*
|
||||
* This is used if driver don't need to have CPU/Codec/Platform
|
||||
* dai_link. see soc.h
|
||||
|
|
@ -2396,7 +2391,7 @@ int snd_soc_component_register(struct snd_soc_component *component,
|
|||
}
|
||||
|
||||
/* see for_each_component */
|
||||
list_add(&component->list, &component_list);
|
||||
list_add(&component->list, snd_soc_component_get_list_head());
|
||||
|
||||
list_for_each_entry_safe(card, c, &unbind_card_list, list)
|
||||
call_soc_bind_card(card);
|
||||
|
|
|
|||
|
|
@ -44,5 +44,9 @@ bool snd_soc_component_matches_dlc(struct snd_soc_component *component,
|
|||
const struct snd_soc_dai_link_component *dlc);
|
||||
void snd_soc_component_remove(struct snd_soc_component *component, int probed);
|
||||
int snd_soc_component_probe(struct snd_soc_component *component, struct snd_soc_card *card);
|
||||
struct list_head *snd_soc_component_get_list_head(void);
|
||||
|
||||
#define for_each_component(component) \
|
||||
list_for_each_entry(component, snd_soc_component_get_list_head(), list)
|
||||
|
||||
#endif /* __SOC_INTERNAL_H */
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user