Merge tag 'md/4.4-rc0-fix' of git://neil.brown.name/md
[firefly-linux-kernel-4.4.55.git] / sound / core / seq / seq.c
index 7121105610826eef0931426129788f6bb9696ffc..7e0aabb808a66007d3719be8ca7885a611164ed3 100644 (file)
@@ -86,7 +86,6 @@ static int __init alsa_seq_init(void)
 {
        int err;
 
-       snd_seq_autoload_lock();
        if ((err = client_init_data()) < 0)
                goto error;
 
@@ -110,8 +109,8 @@ static int __init alsa_seq_init(void)
        if ((err = snd_seq_system_client_init()) < 0)
                goto error;
 
+       snd_seq_autoload_init();
  error:
-       snd_seq_autoload_unlock();
        return err;
 }
 
@@ -131,6 +130,8 @@ static void __exit alsa_seq_exit(void)
 
        /* release event memory */
        snd_sequencer_memory_done();
+
+       snd_seq_autoload_exit();
 }
 
 module_init(alsa_seq_init)