diff options
author | Stephen Warren <swarren@nvidia.com> | 2011-01-08 00:36:11 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-01-10 17:20:04 -0500 |
commit | faff4bb067d15a3bc0dde8c50cbc1a7075e314de (patch) | |
tree | ef00b333c8c66dd6d23bfa43917cadb4f7f15263 | |
parent | 2aa86323d815bab62a7e1d3ef8ed6c81a6dfeffa (diff) |
ASoC: Export debugfs root dentry
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>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | include/sound/soc.h | 4 | ||||
-rw-r--r-- | 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 74921f20a1d8..96aadbba85b2 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) | |||
756 | 756 | ||
757 | #include <sound/soc-dai.h> | 757 | #include <sound/soc-dai.h> |
758 | 758 | ||
759 | #ifdef CONFIG_DEBUG_FS | ||
760 | extern struct dentry *asoc_debugfs_root; | ||
761 | #endif | ||
762 | |||
759 | #endif | 763 | #endif |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 4274435853df..0484e504b589 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -48,7 +48,8 @@ static DEFINE_MUTEX(pcm_mutex); | |||
48 | static DECLARE_WAIT_QUEUE_HEAD(soc_pm_waitq); | 48 | static DECLARE_WAIT_QUEUE_HEAD(soc_pm_waitq); |
49 | 49 | ||
50 | #ifdef CONFIG_DEBUG_FS | 50 | #ifdef CONFIG_DEBUG_FS |
51 | static struct dentry *debugfs_root; | 51 | struct dentry *asoc_debugfs_root; |
52 | EXPORT_SYMBOL_GPL(asoc_debugfs_root); | ||
52 | #endif | 53 | #endif |
53 | 54 | ||
54 | static DEFINE_MUTEX(client_mutex); | 55 | static DEFINE_MUTEX(client_mutex); |
@@ -360,7 +361,7 @@ static const struct file_operations platform_list_fops = { | |||
360 | static void soc_init_card_debugfs(struct snd_soc_card *card) | 361 | static void soc_init_card_debugfs(struct snd_soc_card *card) |
361 | { | 362 | { |
362 | card->debugfs_card_root = debugfs_create_dir(card->name, | 363 | card->debugfs_card_root = debugfs_create_dir(card->name, |
363 | debugfs_root); | 364 | asoc_debugfs_root); |
364 | if (!card->debugfs_card_root) { | 365 | if (!card->debugfs_card_root) { |
365 | dev_warn(card->dev, | 366 | dev_warn(card->dev, |
366 | "ASoC: Failed to create codec debugfs directory\n"); | 367 | "ASoC: Failed to create codec debugfs directory\n"); |
@@ -3583,22 +3584,22 @@ EXPORT_SYMBOL_GPL(snd_soc_unregister_codec); | |||
3583 | static int __init snd_soc_init(void) | 3584 | static int __init snd_soc_init(void) |
3584 | { | 3585 | { |
3585 | #ifdef CONFIG_DEBUG_FS | 3586 | #ifdef CONFIG_DEBUG_FS |
3586 | debugfs_root = debugfs_create_dir("asoc", NULL); | 3587 | asoc_debugfs_root = debugfs_create_dir("asoc", NULL); |
3587 | if (IS_ERR(debugfs_root) || !debugfs_root) { | 3588 | if (IS_ERR(asoc_debugfs_root) || !asoc_debugfs_root) { |
3588 | printk(KERN_WARNING | 3589 | printk(KERN_WARNING |
3589 | "ASoC: Failed to create debugfs directory\n"); | 3590 | "ASoC: Failed to create debugfs directory\n"); |
3590 | debugfs_root = NULL; | 3591 | asoc_debugfs_root = NULL; |
3591 | } | 3592 | } |
3592 | 3593 | ||
3593 | if (!debugfs_create_file("codecs", 0444, debugfs_root, NULL, | 3594 | if (!debugfs_create_file("codecs", 0444, asoc_debugfs_root, NULL, |
3594 | &codec_list_fops)) | 3595 | &codec_list_fops)) |
3595 | pr_warn("ASoC: Failed to create CODEC list debugfs file\n"); | 3596 | pr_warn("ASoC: Failed to create CODEC list debugfs file\n"); |
3596 | 3597 | ||
3597 | if (!debugfs_create_file("dais", 0444, debugfs_root, NULL, | 3598 | if (!debugfs_create_file("dais", 0444, asoc_debugfs_root, NULL, |
3598 | &dai_list_fops)) | 3599 | &dai_list_fops)) |
3599 | pr_warn("ASoC: Failed to create DAI list debugfs file\n"); | 3600 | pr_warn("ASoC: Failed to create DAI list debugfs file\n"); |
3600 | 3601 | ||
3601 | if (!debugfs_create_file("platforms", 0444, debugfs_root, NULL, | 3602 | if (!debugfs_create_file("platforms", 0444, asoc_debugfs_root, NULL, |
3602 | &platform_list_fops)) | 3603 | &platform_list_fops)) |
3603 | pr_warn("ASoC: Failed to create platform list debugfs file\n"); | 3604 | pr_warn("ASoC: Failed to create platform list debugfs file\n"); |
3604 | #endif | 3605 | #endif |
@@ -3610,7 +3611,7 @@ module_init(snd_soc_init); | |||
3610 | static void __exit snd_soc_exit(void) | 3611 | static void __exit snd_soc_exit(void) |
3611 | { | 3612 | { |
3612 | #ifdef CONFIG_DEBUG_FS | 3613 | #ifdef CONFIG_DEBUG_FS |
3613 | debugfs_remove_recursive(debugfs_root); | 3614 | debugfs_remove_recursive(asoc_debugfs_root); |
3614 | #endif | 3615 | #endif |
3615 | platform_driver_unregister(&soc_driver); | 3616 | platform_driver_unregister(&soc_driver); |
3616 | } | 3617 | } |