diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-10-15 14:09:42 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-10-18 20:25:19 +0200 |
commit | d5129f33a0d155d69cb0652cfc87bbc4d132ca17 (patch) | |
tree | 3424906118af81274dad34028ed675d609b1be3c /sound/core | |
parent | 68ab61084de3220e2fb0a698c890ba91decddc85 (diff) |
Subject: ALSA: seq: Remove autoload locks in driver registration
Since we're calling request_module() asynchronously now, we can get
rid of the autoload lock in snd_seq_device_register_driver(), as well
as in the snd-seq driver registration itself. This enables the
automatic loading of dependent sequencer modules, such as
snd-seq-virmidi from snd-emu10k1-synth.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r-- | sound/core/seq/seq.c | 2 | ||||
-rw-r--r-- | sound/core/seq/seq_device.c | 7 |
2 files changed, 1 insertions, 8 deletions
diff --git a/sound/core/seq/seq.c b/sound/core/seq/seq.c index bebdd2e920ca..7e0aabb808a6 100644 --- a/sound/core/seq/seq.c +++ b/sound/core/seq/seq.c @@ -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; @@ -112,7 +111,6 @@ static int __init alsa_seq_init(void) snd_seq_autoload_init(); error: - snd_seq_autoload_unlock(); return err; } diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c index a8e2c6016800..0631bdadd12b 100644 --- a/sound/core/seq/seq_device.c +++ b/sound/core/seq/seq_device.c @@ -360,16 +360,12 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry, entry->init_device == NULL || entry->free_device == NULL) return -EINVAL; - snd_seq_autoload_lock(); ops = find_driver(id, 1); - if (ops == NULL) { - snd_seq_autoload_unlock(); + if (ops == NULL) return -ENOMEM; - } if (ops->driver & DRIVER_LOADED) { pr_warn("ALSA: seq: driver_register: driver '%s' already exists\n", id); unlock_driver(ops); - snd_seq_autoload_unlock(); return -EBUSY; } @@ -386,7 +382,6 @@ int snd_seq_device_register_driver(char *id, struct snd_seq_dev_ops *entry, mutex_unlock(&ops->reg_mutex); unlock_driver(ops); - snd_seq_autoload_unlock(); return 0; } |