aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/core/seq/seq_device.c')
-rw-r--r--sound/core/seq/seq_device.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index 48b20f009598..355b34269bd1 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -98,19 +98,8 @@ static void snd_seq_device_info(struct snd_info_entry *entry,
98 */ 98 */
99 99
100#ifdef CONFIG_MODULES 100#ifdef CONFIG_MODULES
101/* avoid auto-loading during module_init() */ 101/* flag to block auto-loading */
102static atomic_t snd_seq_in_init = ATOMIC_INIT(1); /* blocked as default */ 102static atomic_t snd_seq_in_init = ATOMIC_INIT(1); /* blocked as default */
103void snd_seq_autoload_lock(void)
104{
105 atomic_inc(&snd_seq_in_init);
106}
107EXPORT_SYMBOL(snd_seq_autoload_lock);
108
109void snd_seq_autoload_unlock(void)
110{
111 atomic_dec(&snd_seq_in_init);
112}
113EXPORT_SYMBOL(snd_seq_autoload_unlock);
114 103
115static int request_seq_drv(struct device *dev, void *data) 104static int request_seq_drv(struct device *dev, void *data)
116{ 105{
@@ -147,6 +136,12 @@ void snd_seq_autoload_init(void)
147} 136}
148EXPORT_SYMBOL(snd_seq_autoload_init); 137EXPORT_SYMBOL(snd_seq_autoload_init);
149 138
139void snd_seq_autoload_exit(void)
140{
141 atomic_inc(&snd_seq_in_init);
142}
143EXPORT_SYMBOL(snd_seq_autoload_exit);
144
150void snd_seq_device_load_drivers(void) 145void snd_seq_device_load_drivers(void)
151{ 146{
152 queue_autoload_drivers(); 147 queue_autoload_drivers();