diff options
Diffstat (limited to 'sound/core/seq/seq_device.c')
-rw-r--r-- | sound/core/seq/seq_device.c | 19 |
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 */ |
102 | static atomic_t snd_seq_in_init = ATOMIC_INIT(1); /* blocked as default */ | 102 | static atomic_t snd_seq_in_init = ATOMIC_INIT(1); /* blocked as default */ |
103 | void snd_seq_autoload_lock(void) | ||
104 | { | ||
105 | atomic_inc(&snd_seq_in_init); | ||
106 | } | ||
107 | EXPORT_SYMBOL(snd_seq_autoload_lock); | ||
108 | |||
109 | void snd_seq_autoload_unlock(void) | ||
110 | { | ||
111 | atomic_dec(&snd_seq_in_init); | ||
112 | } | ||
113 | EXPORT_SYMBOL(snd_seq_autoload_unlock); | ||
114 | 103 | ||
115 | static int request_seq_drv(struct device *dev, void *data) | 104 | static int request_seq_drv(struct device *dev, void *data) |
116 | { | 105 | { |
@@ -147,6 +136,12 @@ void snd_seq_autoload_init(void) | |||
147 | } | 136 | } |
148 | EXPORT_SYMBOL(snd_seq_autoload_init); | 137 | EXPORT_SYMBOL(snd_seq_autoload_init); |
149 | 138 | ||
139 | void snd_seq_autoload_exit(void) | ||
140 | { | ||
141 | atomic_inc(&snd_seq_in_init); | ||
142 | } | ||
143 | EXPORT_SYMBOL(snd_seq_autoload_exit); | ||
144 | |||
150 | void snd_seq_device_load_drivers(void) | 145 | void snd_seq_device_load_drivers(void) |
151 | { | 146 | { |
152 | queue_autoload_drivers(); | 147 | queue_autoload_drivers(); |