All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: Linux-ALSA <alsa-devel@alsa-project.org>
Subject: [PATCH v2 16/25] ASoC: soc-core: merge snd_soc_initialize_card_lists()
Date: 07 Aug 2019 10:31:40 +0900	[thread overview]
Message-ID: <8736idahnl.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87pnlhahr6.wl-kuninori.morimoto.gx@renesas.com>

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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>
---
v1 -> v2

	- no change

 include/sound/soc.h  | 10 ----------
 sound/soc/soc-core.c | 13 ++++++++-----
 2 files changed, 8 insertions(+), 15 deletions(-)

diff --git a/include/sound/soc.h b/include/sound/soc.h
index 85ad971..c92697e 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1210,16 +1210,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)
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 665223f..b631ab5 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -2389,15 +2389,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);
-- 
2.7.4

  parent reply	other threads:[~2019-08-07  1:31 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-07  1:29 [PATCH v2 00/25] ASoC: cleanup patches for soc-core Kuninori Morimoto
2019-08-07  1:29 ` [PATCH v2 01/25] ASoC: soc-core: use device_register() Kuninori Morimoto
2019-08-07  1:30 ` [PATCH v2 02/25] ASoC: soc-core: set component->debugfs_root NULL Kuninori Morimoto
2019-08-07 13:30   ` Applied "ASoC: soc-core: set component->debugfs_root NULL" to the asoc tree Mark Brown
2019-08-07  1:30 ` [PATCH v2 03/25] ASoC: soc-core: add comment for for_each_xxx Kuninori Morimoto
2019-08-07 13:30   ` Applied "ASoC: soc-core: add comment for for_each_xxx" to the asoc tree Mark Brown
2019-08-07  1:30 ` [PATCH v2 04/25] ASoC: soc-core: check return value of snd_soc_add_dai_link() Kuninori Morimoto
2019-08-07 13:30   ` Applied "ASoC: soc-core: check return value of snd_soc_add_dai_link()" to the asoc tree Mark Brown
2019-08-07  1:30 ` [PATCH v2 05/25] ASoC: soc-core: don't use for_each_card_links_safe() at snd_soc_find_dai_link() Kuninori Morimoto
2019-08-07 13:30   ` Applied "ASoC: soc-core: don't use for_each_card_links_safe() at snd_soc_find_dai_link()" to the asoc tree Mark Brown
2019-08-07  1:30 ` [PATCH v2 06/25] ASoC: soc-core: reuse rtdcom at snd_soc_rtdcom_add() Kuninori Morimoto
2019-08-07 13:30   ` Applied "ASoC: soc-core: reuse rtdcom at snd_soc_rtdcom_add()" to the asoc tree Mark Brown
2019-08-07  1:30 ` [PATCH v2 07/25] ASoC: soc-core: tidyup for snd_soc_dapm_new_controls() Kuninori Morimoto
2019-08-07 13:30   ` Applied "ASoC: soc-core: tidyup for snd_soc_dapm_new_controls()" to the asoc tree Mark Brown
2019-08-07  1:30 ` [PATCH v2 08/25] ASoC: soc-core: tidyup for snd_soc_add_component_controls() Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: tidyup for snd_soc_add_component_controls()" to the asoc tree Mark Brown
2019-08-07  1:31 ` [PATCH v2 09/25] ASoC: soc-core: tidyup for snd_soc_dapm_add_routes() Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: tidyup for snd_soc_dapm_add_routes()" to the asoc tree Mark Brown
2019-08-20 11:18   ` [PATCH v2 09/25] ASoC: soc-core: tidyup for snd_soc_dapm_add_routes() Cezary Rojewski
2019-08-20 12:36     ` Pierre-Louis Bossart
2019-08-20 13:38       ` Cezary Rojewski
2019-08-20 14:05         ` Pierre-Louis Bossart
2019-08-20 15:04           ` Cezary Rojewski
2019-08-20 17:39             ` Pierre-Louis Bossart
2019-08-20 17:40     ` Mark Brown
2019-08-07  1:31 ` [PATCH v2 10/25] ASoC: soc-core: tidyup for snd_soc_add_card_controls() Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: tidyup for snd_soc_add_card_controls()" to the asoc tree Mark Brown
2019-08-07  1:31 ` [PATCH v2 11/25] ASoC: soc-core: call snd_soc_dapm_debugfs_init() at soc_init_card_debugfs() Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: call snd_soc_dapm_debugfs_init() at soc_init_card_debugfs()" to the asoc tree Mark Brown
2019-08-07  1:31 ` [PATCH v2 12/25] ASoC: soc-core: remove unneeded list_empty() check for snd_soc_try_rebind_card() Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: remove unneeded list_empty() check for snd_soc_try_rebind_card()" to the asoc tree Mark Brown
2019-08-07  1:31 ` [PATCH v2 13/25] ASoC: soc-core: tidyup for card->deferred_resume_work Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: tidyup for card->deferred_resume_work" to the asoc tree Mark Brown
2019-08-07  1:31 ` [PATCH v2 14/25] ASoC: soc-core: define soc_dpcm_debugfs_add() for non CONFIG_DEBUG_FS Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: define soc_dpcm_debugfs_add() for non CONFIG_DEBUG_FS" to the asoc tree Mark Brown
2019-08-07  1:31 ` [PATCH v2 15/25] ASoC: soc-core: dai_link check under soc_dpcm_debugfs_add() Kuninori Morimoto
2019-08-08 20:33   ` Applied "ASoC: soc-core: dai_link check under soc_dpcm_debugfs_add()" to the asoc tree Mark Brown
2019-08-07  1:31 ` Kuninori Morimoto [this message]
2019-08-07  1:31 ` [PATCH v2 17/25] ASoC: soc-core: remove unneeded dai_link check from snd_soc_remove_dai_link() Kuninori Morimoto
2019-08-07  1:31 ` [PATCH v2 18/25] ASoC: soc-core: add NOTE to snd_soc_rtdcom_lookup() Kuninori Morimoto
2019-08-07  1:31 ` [PATCH v2 19/25] ASoC: soc-core: don't call snd_soc_component_set_jack() Kuninori Morimoto
2019-08-07 18:49   ` Cezary Rojewski
2019-08-08  9:14     ` Amadeusz Sławiński
2019-08-20  4:24       ` Kuninori Morimoto
2019-08-28 12:06         ` Mark Brown
2019-08-29  0:16           ` Kuninori Morimoto
2019-08-29  9:58             ` Mark Brown
2019-08-07  1:31 ` [PATCH v2 20/25] ASoC: soc-core: don't alloc memory carelessly when creating debugfs Kuninori Morimoto
2019-08-07  1:32 ` [PATCH v2 21/25] ASoC: soc-core: soc_cleanup_card_resources() become void Kuninori Morimoto
2019-08-07  1:32 ` [PATCH v2 22/25] ASoC: soc-core: initialize component list Kuninori Morimoto
2019-08-07  1:32 ` [PATCH v2 23/25] ASoC: soc-core: initialize list at one place Kuninori Morimoto
2019-08-07  1:32 ` [PATCH v2 24/25] ASoC: soc-dai: use bit field for bus_control Kuninori Morimoto
2019-08-07  1:32 ` [PATCH v2 25/25] ASoC: soc-topology: use for_each_component_dais() at remove_dai() Kuninori Morimoto
2019-08-07  3:20   ` Sridharan, Ranjani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8736idahnl.wl-kuninori.morimoto.gx@renesas.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.