diff options
author | Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 2019-08-20 01:05:20 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2019-08-22 13:35:03 -0400 |
commit | 495efdb01f89a5fc53f9b2e61f5726d804d4a15d (patch) | |
tree | 96288f2e126b5a327df634f5077bffe2ab449504 /sound | |
parent | b2f3e0c9e4ee2e07fd880cc0c4da20c42d633d4b (diff) |
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>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/soc-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 1a17cb1bc03b..0af83963289f 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -1272,7 +1272,6 @@ static int soc_probe_component(struct snd_soc_card *card, | |||
1272 | 1272 | ||
1273 | component->card = card; | 1273 | component->card = card; |
1274 | dapm->card = card; | 1274 | dapm->card = card; |
1275 | INIT_LIST_HEAD(&component->card_list); | ||
1276 | INIT_LIST_HEAD(&dapm->list); | 1275 | INIT_LIST_HEAD(&dapm->list); |
1277 | soc_set_name_prefix(card, component); | 1276 | soc_set_name_prefix(card, component); |
1278 | 1277 | ||
@@ -2648,6 +2647,8 @@ static int snd_soc_component_initialize(struct snd_soc_component *component, | |||
2648 | struct snd_soc_dapm_context *dapm; | 2647 | struct snd_soc_dapm_context *dapm; |
2649 | 2648 | ||
2650 | INIT_LIST_HEAD(&component->dai_list); | 2649 | INIT_LIST_HEAD(&component->dai_list); |
2650 | INIT_LIST_HEAD(&component->dobj_list); | ||
2651 | INIT_LIST_HEAD(&component->card_list); | ||
2651 | mutex_init(&component->io_mutex); | 2652 | mutex_init(&component->io_mutex); |
2652 | 2653 | ||
2653 | component->name = fmt_single_name(dev, &component->id); | 2654 | component->name = fmt_single_name(dev, &component->id); |
@@ -2733,7 +2734,6 @@ static void snd_soc_component_add(struct snd_soc_component *component) | |||
2733 | 2734 | ||
2734 | /* see for_each_component */ | 2735 | /* see for_each_component */ |
2735 | list_add(&component->list, &component_list); | 2736 | list_add(&component->list, &component_list); |
2736 | INIT_LIST_HEAD(&component->dobj_list); | ||
2737 | 2737 | ||
2738 | mutex_unlock(&client_mutex); | 2738 | mutex_unlock(&client_mutex); |
2739 | } | 2739 | } |