ASoC: soc-core: merge snd_soc_initialize_card_lists()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Tue, 20 Aug 2019 05:04:54 +0000 (14:04 +0900)
committerMark Brown <broonie@kernel.org>
Wed, 21 Aug 2019 12:11:12 +0000 (13:11 +0100)
snd_soc_initialize_card_lists() is doing card related
INIT_LIST_HEAD(), but, it is already doing at
snd_soc_register_card(). We don't need to do it separately.
This patch merges these.

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/877e781ldq.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
include/sound/soc.h
sound/soc/soc-core.c

index 5c841c2ee81498c9ed013ec0c621d3b835b331c2..f264c6509f003242282d9132d317da199ea9393e 100644 (file)
@@ -1220,16 +1220,6 @@ static inline void *snd_soc_card_get_drvdata(struct snd_soc_card *card)
        return card->drvdata;
 }
 
-static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
-{
-       INIT_LIST_HEAD(&card->widgets);
-       INIT_LIST_HEAD(&card->paths);
-       INIT_LIST_HEAD(&card->dapm_list);
-       INIT_LIST_HEAD(&card->aux_comp_list);
-       INIT_LIST_HEAD(&card->component_dev_list);
-       INIT_LIST_HEAD(&card->list);
-}
-
 static inline bool snd_soc_volsw_is_stereo(struct soc_mixer_control *mc)
 {
        if (mc->reg == mc->rreg && mc->shift == mc->rshift)
index b3f820fb53e61e4c012162724d17b39c8a07d834..d428491d51a7f38a2098bdb1cf8c7cce403b8dff 100644 (file)
@@ -2370,15 +2370,18 @@ int snd_soc_register_card(struct snd_soc_card *card)
 
        dev_set_drvdata(card->dev, card);
 
-       snd_soc_initialize_card_lists(card);
-
+       INIT_LIST_HEAD(&card->widgets);
+       INIT_LIST_HEAD(&card->paths);
+       INIT_LIST_HEAD(&card->dapm_list);
+       INIT_LIST_HEAD(&card->aux_comp_list);
+       INIT_LIST_HEAD(&card->component_dev_list);
+       INIT_LIST_HEAD(&card->list);
        INIT_LIST_HEAD(&card->dai_link_list);
-
        INIT_LIST_HEAD(&card->rtd_list);
-       card->num_rtd = 0;
-
        INIT_LIST_HEAD(&card->dapm_dirty);
        INIT_LIST_HEAD(&card->dobj_list);
+
+       card->num_rtd = 0;
        card->instantiated = 0;
        mutex_init(&card->mutex);
        mutex_init(&card->dapm_mutex);