diff options
-rw-r--r-- | include/sound/soc.h | 3 | ||||
-rw-r--r-- | sound/soc/soc-core.c | 4 | ||||
-rw-r--r-- | 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 cb6b18b6eece..6ce3e573fb40 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) | |||
888 | INIT_LIST_HEAD(&card->dapm_list); | 888 | INIT_LIST_HEAD(&card->dapm_list); |
889 | } | 889 | } |
890 | 890 | ||
891 | int snd_soc_util_init(void); | ||
892 | void snd_soc_util_exit(void); | ||
893 | |||
891 | #include <sound/soc-dai.h> | 894 | #include <sound/soc-dai.h> |
892 | 895 | ||
893 | #ifdef CONFIG_DEBUG_FS | 896 | #ifdef CONFIG_DEBUG_FS |
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 16be3e5cf9e7..a823654ef367 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c | |||
@@ -3868,12 +3868,16 @@ static int __init snd_soc_init(void) | |||
3868 | pr_warn("ASoC: Failed to create platform list debugfs file\n"); | 3868 | pr_warn("ASoC: Failed to create platform list debugfs file\n"); |
3869 | #endif | 3869 | #endif |
3870 | 3870 | ||
3871 | snd_soc_util_init(); | ||
3872 | |||
3871 | return platform_driver_register(&soc_driver); | 3873 | return platform_driver_register(&soc_driver); |
3872 | } | 3874 | } |
3873 | module_init(snd_soc_init); | 3875 | module_init(snd_soc_init); |
3874 | 3876 | ||
3875 | static void __exit snd_soc_exit(void) | 3877 | static void __exit snd_soc_exit(void) |
3876 | { | 3878 | { |
3879 | snd_soc_util_exit(); | ||
3880 | |||
3877 | #ifdef CONFIG_DEBUG_FS | 3881 | #ifdef CONFIG_DEBUG_FS |
3878 | debugfs_remove_recursive(snd_soc_debugfs_root); | 3882 | debugfs_remove_recursive(snd_soc_debugfs_root); |
3879 | #endif | 3883 | #endif |
diff --git a/sound/soc/soc-utils.c b/sound/soc/soc-utils.c index 286579140882..ec921ec99c26 100644 --- a/sound/soc/soc-utils.c +++ b/sound/soc/soc-utils.c | |||
@@ -82,7 +82,7 @@ static struct platform_driver soc_dummy_driver = { | |||
82 | 82 | ||
83 | static struct platform_device *soc_dummy_dev; | 83 | static struct platform_device *soc_dummy_dev; |
84 | 84 | ||
85 | static int __init snd_soc_util_init(void) | 85 | int __init snd_soc_util_init(void) |
86 | { | 86 | { |
87 | int ret; | 87 | int ret; |
88 | 88 | ||
@@ -102,11 +102,9 @@ static int __init snd_soc_util_init(void) | |||
102 | 102 | ||
103 | return ret; | 103 | return ret; |
104 | } | 104 | } |
105 | module_init(snd_soc_util_init); | ||
106 | 105 | ||
107 | static void __exit snd_soc_util_exit(void) | 106 | void __exit snd_soc_util_exit(void) |
108 | { | 107 | { |
109 | platform_device_unregister(soc_dummy_dev); | 108 | platform_device_unregister(soc_dummy_dev); |
110 | platform_driver_unregister(&soc_dummy_driver); | 109 | platform_driver_unregister(&soc_dummy_driver); |
111 | } | 110 | } |
112 | module_exit(snd_soc_util_exit); | ||