1
0
Fork 0

ASoC: soc-core: initialize list at one place

Initialize component related list at random place is very difficult
to read. This patch initialize it at snd_soc_component_initialize().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/87y2zozazp.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
alistair/sunxi64-5.4-dsi
Kuninori Morimoto 2019-08-20 14:05:20 +09:00 committed by Mark Brown
parent b2f3e0c9e4
commit 495efdb01f
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
1 changed files with 2 additions and 2 deletions

View File

@ -1272,7 +1272,6 @@ static int soc_probe_component(struct snd_soc_card *card,
component->card = card;
dapm->card = card;
INIT_LIST_HEAD(&component->card_list);
INIT_LIST_HEAD(&dapm->list);
soc_set_name_prefix(card, component);
@ -2648,6 +2647,8 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
struct snd_soc_dapm_context *dapm;
INIT_LIST_HEAD(&component->dai_list);
INIT_LIST_HEAD(&component->dobj_list);
INIT_LIST_HEAD(&component->card_list);
mutex_init(&component->io_mutex);
component->name = fmt_single_name(dev, &component->id);
@ -2733,7 +2734,6 @@ static void snd_soc_component_add(struct snd_soc_component *component)
/* see for_each_component */
list_add(&component->list, &component_list);
INIT_LIST_HEAD(&component->dobj_list);
mutex_unlock(&client_mutex);
}