From: Stephen Warren <swarren@nvidia.com>
To: alsa-devel@alsa-project.org
Cc: Stephen Warren <swarren@nvidia.com>
Subject: [PATCH 1/7] ASoC: Export debugfs root dentry
Date: Fri, 7 Jan 2011 22:36:11 -0700 [thread overview]
Message-ID: <1294464977-25814-2-git-send-email-swarren@nvidia.com> (raw)
In-Reply-To: <1294464977-25814-1-git-send-email-swarren@nvidia.com>
A couple Tegra ASoC drivers will create debugfs entries. Mark requested
these by under debugfs/asoc/ not just debugfs/. To enable this, export
the dentry representing debugfs/asoc/.
Also, rename debugfs_root -> asoc_debugfs_root now it's exported to
prevent potential symbol name clashes.
Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
include/sound/soc.h | 4 ++++
sound/soc/soc-core.c | 19 ++++++++++---------
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index 74921f2..96aadbb 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -756,4 +756,8 @@ static inline void *snd_soc_pcm_get_drvdata(struct snd_soc_pcm_runtime *rtd)
#include <sound/soc-dai.h>
+#ifdef CONFIG_DEBUG_FS
+extern struct dentry *asoc_debugfs_root;
+#endif
+
#endif
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index bac7291..731e2cc 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -48,7 +48,8 @@ static DEFINE_MUTEX(pcm_mutex);
static DECLARE_WAIT_QUEUE_HEAD(soc_pm_waitq);
#ifdef CONFIG_DEBUG_FS
-static struct dentry *debugfs_root;
+struct dentry *asoc_debugfs_root;
+EXPORT_SYMBOL_GPL(asoc_debugfs_root);
#endif
static DEFINE_MUTEX(client_mutex);
@@ -356,7 +357,7 @@ static const struct file_operations platform_list_fops = {
static void soc_init_card_debugfs(struct snd_soc_card *card)
{
card->debugfs_card_root = debugfs_create_dir(card->name,
- debugfs_root);
+ asoc_debugfs_root);
if (!card->debugfs_card_root) {
dev_warn(card->dev,
"ASoC: Failed to create codec debugfs directory\n");
@@ -3577,22 +3578,22 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_codec);
static int __init snd_soc_init(void)
{
#ifdef CONFIG_DEBUG_FS
- debugfs_root = debugfs_create_dir("asoc", NULL);
- if (IS_ERR(debugfs_root) || !debugfs_root) {
+ asoc_debugfs_root = debugfs_create_dir("asoc", NULL);
+ if (IS_ERR(asoc_debugfs_root) || !asoc_debugfs_root) {
printk(KERN_WARNING
"ASoC: Failed to create debugfs directory\n");
- debugfs_root = NULL;
+ asoc_debugfs_root = NULL;
}
- if (!debugfs_create_file("codecs", 0444, debugfs_root, NULL,
+ if (!debugfs_create_file("codecs", 0444, asoc_debugfs_root, NULL,
&codec_list_fops))
pr_warn("ASoC: Failed to create CODEC list debugfs file\n");
- if (!debugfs_create_file("dais", 0444, debugfs_root, NULL,
+ if (!debugfs_create_file("dais", 0444, asoc_debugfs_root, NULL,
&dai_list_fops))
pr_warn("ASoC: Failed to create DAI list debugfs file\n");
- if (!debugfs_create_file("platforms", 0444, debugfs_root, NULL,
+ if (!debugfs_create_file("platforms", 0444, asoc_debugfs_root, NULL,
&platform_list_fops))
pr_warn("ASoC: Failed to create platform list debugfs file\n");
#endif
@@ -3604,7 +3605,7 @@ module_init(snd_soc_init);
static void __exit snd_soc_exit(void)
{
#ifdef CONFIG_DEBUG_FS
- debugfs_remove_recursive(debugfs_root);
+ debugfs_remove_recursive(asoc_debugfs_root);
#endif
platform_driver_unregister(&soc_driver);
}
--
1.7.0.4
next prev parent reply other threads:[~2011-01-08 5:36 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1294450353-25076-1-git-send-email-swarren@wwwdotorg.org>
2011-01-08 5:36 ` [PATCH 0/7] Tegra ALSA/ASoC driver Stephen Warren
2011-01-08 5:36 ` Stephen Warren [this message]
2011-01-10 11:57 ` [PATCH 1/7] ASoC: Export debugfs root dentry Mark Brown
2011-01-08 5:36 ` [PATCH 2/7] ASoC: tegra: Add tegra-das driver Stephen Warren
2011-01-08 5:36 ` [PATCH 3/7] ASoC: tegra: Add tegra-pcm driver Stephen Warren
2011-01-11 7:59 ` Peter Ujfalusi
2011-01-11 16:34 ` Stephen Warren
2011-01-08 5:36 ` [PATCH 4/7] ASoC: tegra: Add tegra-i2s driver Stephen Warren
2011-01-08 5:36 ` [PATCH 5/7] ASoC: tegra: Machine utility code Stephen Warren
2011-01-08 5:36 ` [PATCH 6/7] ASoC: tegra: Harmony machine support Stephen Warren
2011-01-08 5:36 ` [PATCH 7/7] ASoC: tegra: Kconfig and Makefile Stephen Warren
2011-01-09 13:59 ` [PATCH 0/7] Tegra ALSA/ASoC driver Mark Brown
2011-01-10 18:35 ` Mark Brown
2011-01-10 21:47 ` Liam Girdwood
2011-01-10 22:27 ` Mark Brown
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=1294464977-25814-2-git-send-email-swarren@nvidia.com \
--to=swarren@nvidia.com \
--cc=alsa-devel@alsa-project.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).