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 06/10] ASoC: add component_list_show()
Date: Tue, 8 May 2018 03:21:00 +0000	[thread overview]
Message-ID: <87d0y6rg3g.wl%kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87lgcurg9f.wl%kuninori.morimoto.gx@renesas.com>


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

commit ef050bece1b55 ("ASoC: Remove platform code now everything is
componentised") removed platform code, then platform_list_show() was
removed, too. But we want to keep it as component_list_show.
This patch add it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/soc-core.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index a4cb141..f22ef34 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -190,6 +190,21 @@ static int dai_list_show(struct seq_file *m, void *v)
 }
 DEFINE_SHOW_ATTRIBUTE(dai_list);
 
+static int component_list_show(struct seq_file *m, void *v)
+{
+	struct snd_soc_component *component;
+
+	mutex_lock(&client_mutex);
+
+	list_for_each_entry(component, &component_list, list)
+		seq_printf(m, "%s\n", component->name);
+
+	mutex_unlock(&client_mutex);
+
+	return 0;
+}
+DEFINE_SHOW_ATTRIBUTE(component_list);
+
 static void soc_init_card_debugfs(struct snd_soc_card *card)
 {
 	if (!snd_soc_debugfs_root)
@@ -228,6 +243,10 @@ static void snd_soc_debugfs_init(void)
 	if (!debugfs_create_file("dais", 0444, snd_soc_debugfs_root, NULL,
 				 &dai_list_fops))
 		pr_warn("ASoC: Failed to create DAI list debugfs file\n");
+
+	if (!debugfs_create_file("components", 0444, snd_soc_debugfs_root, NULL,
+				 &component_list_fops))
+		pr_warn("ASoC: Failed to create component list debugfs file\n");
 }
 
 static void snd_soc_debugfs_exit(void)
-- 
1.9.1

  parent reply	other threads:[~2018-05-08  3:21 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-08  3:17 [PATCH 00/10] ASoC: remove old platform/codec code Kuninori Morimoto
2018-05-08  3:18 ` [PATCH 01/10] ASoC: remove codec hw_write/control_data Kuninori Morimoto
2018-05-08 11:44   ` Charles Keepax
2018-05-08  3:18 ` [PATCH 02/10] ASoC: remove codec reg_cache Kuninori Morimoto
2018-05-08 11:51   ` Charles Keepax
2018-05-09  9:45   ` Applied "ASoC: remove codec reg_cache" to the asoc tree Mark Brown
2018-05-08  3:19 ` [PATCH 03/10] ASoC: remove .get_regmap Kuninori Morimoto
2018-05-08 11:53   ` Charles Keepax
2018-05-08  3:19 ` [PATCH 04/10] ASoC: remove unneeded .pcm_new/free Kuninori Morimoto
2018-05-08 11:54   ` Charles Keepax
2018-05-09  9:44   ` Applied "ASoC: remove unneeded .pcm_new/free" to the asoc tree Mark Brown
2018-05-08  3:20 ` [PATCH 05/10] ASoC: remove Codec related code Kuninori Morimoto
2018-05-08 12:18   ` Charles Keepax
2018-05-08  3:21 ` Kuninori Morimoto [this message]
2018-05-08 12:19   ` [PATCH 06/10] ASoC: add component_list_show() Charles Keepax
2018-05-09  9:44   ` Applied "ASoC: add component_list_show()" to the asoc tree Mark Brown
2018-05-08  3:21 ` [PATCH 07/10] ASoC: convert platform explanation to component Kuninori Morimoto
2018-05-08 12:20   ` Charles Keepax
2018-05-08  3:21 ` [PATCH 08/10] ASoC: soc.h: merge CONFIG_DEBUG_FS Kuninori Morimoto
2018-05-08 12:20   ` Charles Keepax
2018-05-09  9:42   ` Applied "ASoC: soc.h: merge CONFIG_DEBUG_FS" to the asoc tree Mark Brown
2018-05-08  3:22 ` [PATCH 09/10] ASoC: soc-core: remove snd_soc_component_add_unlocked() Kuninori Morimoto
2018-05-08 12:38   ` Charles Keepax
2018-05-09  9:42   ` Applied "ASoC: soc-core: remove snd_soc_component_add_unlocked()" to the asoc tree Mark Brown
2018-05-08  3:23 ` [PATCH 10/10] ASoC: soc-core: remove legacy_dai_naming from snd_soc_register_dais() Kuninori Morimoto
2018-05-08 12:38   ` Charles Keepax

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=87d0y6rg3g.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.