[alsa-devel] [PATCH] ASoC: Work around allmodconfig failure
Mark Brown
broonie at opensource.wolfsonmicro.com
Thu Apr 28 11:58:47 CEST 2011
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
include/sound/soc.h | 3 +++
sound/soc/soc-core.c | 4 ++++
sound/soc/soc-utils.c | 6 ++----
3 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index cb6b18b..6ce3e57 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -888,6 +888,9 @@ static inline void snd_soc_initialize_card_lists(struct snd_soc_card *card)
INIT_LIST_HEAD(&card->dapm_list);
}
+int snd_soc_util_init(void);
+void snd_soc_util_exit(void);
+
#include <sound/soc-dai.h>
#ifdef CONFIG_DEBUG_FS
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 16be3e5..a823654 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3868,12 +3868,16 @@ static int __init snd_soc_init(void)
pr_warn("ASoC: Failed to create platform list debugfs file\n");
#endif
+ snd_soc_util_init();
+
return platform_driver_register(&soc_driver);
}
module_init(snd_soc_init);
static void __exit snd_soc_exit(void)
{
+ snd_soc_util_exit();
+
#ifdef CONFIG_DEBUG_FS
debugfs_remove_recursive(snd_soc_debugfs_root);
#endif
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c
index 2865791..ec921ec 100644
--- a/sound/soc/soc-utils.c
+++ b/sound/soc/soc-utils.c
@@ -82,7 +82,7 @@ static struct platform_driver soc_dummy_driver = {
static struct platform_device *soc_dummy_dev;
-static int __init snd_soc_util_init(void)
+int __init snd_soc_util_init(void)
{
int ret;
@@ -102,11 +102,9 @@ static int __init snd_soc_util_init(void)
return ret;
}
-module_init(snd_soc_util_init);
-static void __exit snd_soc_util_exit(void)
+void __exit snd_soc_util_exit(void)
{
platform_device_unregister(soc_dummy_dev);
platform_driver_unregister(&soc_dummy_driver);
}
-module_exit(snd_soc_util_exit);
--
1.7.4.1
More information about the Alsa-devel
mailing list