aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_device.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-10-15 14:09:42 +0200
committerTakashi Iwai <tiwai@suse.de>2014-10-18 20:25:19 +0200
commitd5129f33a0d155d69cb0652cfc87bbc4d132ca17 (patch)
tree3424906118af81274dad34028ed675d609b1be3c /sound/core/seq/seq_device.c
parentALSA: seq: bind seq driver automatically (diff)
downloadlinux-dev-d5129f33a0d155d69cb0652cfc87bbc4d132ca17.tar.xz
linux-dev-d5129f33a0d155d69cb0652cfc87bbc4d132ca17.zip
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/seq/seq_device.c')
-rw-r--r--sound/core/seq/seq_device.c7
1 files changed, 1 insertions, 6 deletions
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;
}