summaryrefslogtreecommitdiff
path: root/sound/core/seq/seq_device.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-12 14:20:24 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-12 14:42:31 +0100
commit54a721abd7953a58e5479065c0cfdd8679d785c9 (patch)
tree9b16bb0c1901cafb16cfd06f4f77a7bd08b8b0f2 /sound/core/seq/seq_device.c
parent056622053b8ae02978678ac1321b5bd956e7c812 (diff)
ALSA: seq: Drop snd_seq_autoload_lock() and _unlock()
The autoload lock became already superfluous due to the recent rework of autoload code. Let's drop them now. This allows us to simplify a few codes nicely. Signed-off-by: Takashi Iwai <tiwai@suse.de>
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,
*/
#ifdef CONFIG_MODULES
-/* avoid auto-loading during module_init() */
+/* flag to block auto-loading */
static atomic_t snd_seq_in_init = ATOMIC_INIT(1); /* blocked as default */
-void snd_seq_autoload_lock(void)
-{
- atomic_inc(&snd_seq_in_init);
-}
-EXPORT_SYMBOL(snd_seq_autoload_lock);
-
-void snd_seq_autoload_unlock(void)
-{
- atomic_dec(&snd_seq_in_init);
-}
-EXPORT_SYMBOL(snd_seq_autoload_unlock);
static int request_seq_drv(struct device *dev, void *data)
{
@@ -147,6 +136,12 @@ void snd_seq_autoload_init(void)
}
EXPORT_SYMBOL(snd_seq_autoload_init);
+void snd_seq_autoload_exit(void)
+{
+ atomic_inc(&snd_seq_in_init);
+}
+EXPORT_SYMBOL(snd_seq_autoload_exit);
+
void snd_seq_device_load_drivers(void)
{
queue_autoload_drivers();