diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-11 06:16:36 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-07-12 11:41:05 -0400 |
commit | 90dc763fef4c869e60b2a7ad92e1a7dab68575ea (patch) | |
tree | ab3757f14a6d84e36afa36ac5f325fd316d4e197 /arch/um/drivers | |
parent | 395c61d19621e80b763810cc988416dc1b6bfd3e (diff) |
sound: push BKL into open functions
This moves the lock_kernel() call from soundcore_open
to the individual OSS device drivers, where we can deal
with it one driver at a time if needed, or just kill
off the drivers.
All core components in ALSA already provide
adequate locking in their open()-functions
and do not require the big kernel lock, so
there is no need to add the BKL there.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r-- | arch/um/drivers/hostaudio_kern.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/um/drivers/hostaudio_kern.c b/arch/um/drivers/hostaudio_kern.c index ae42695c3597..68142df76608 100644 --- a/arch/um/drivers/hostaudio_kern.c +++ b/arch/um/drivers/hostaudio_kern.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include "linux/slab.h" | 8 | #include "linux/slab.h" |
9 | #include "linux/sound.h" | 9 | #include "linux/sound.h" |
10 | #include "linux/soundcard.h" | 10 | #include "linux/soundcard.h" |
11 | #include "linux/smp_lock.h" | ||
11 | #include "asm/uaccess.h" | 12 | #include "asm/uaccess.h" |
12 | #include "init.h" | 13 | #include "init.h" |
13 | #include "os.h" | 14 | #include "os.h" |
@@ -198,7 +199,10 @@ static int hostaudio_open(struct inode *inode, struct file *file) | |||
198 | if (file->f_mode & FMODE_WRITE) | 199 | if (file->f_mode & FMODE_WRITE) |
199 | w = 1; | 200 | w = 1; |
200 | 201 | ||
202 | lock_kernel(); | ||
201 | ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); | 203 | ret = os_open_file(dsp, of_set_rw(OPENFLAGS(), r, w), 0); |
204 | unlock_kernel(); | ||
205 | |||
202 | if (ret < 0) { | 206 | if (ret < 0) { |
203 | kfree(state); | 207 | kfree(state); |
204 | return ret; | 208 | return ret; |
@@ -254,7 +258,9 @@ static int hostmixer_open_mixdev(struct inode *inode, struct file *file) | |||
254 | if (file->f_mode & FMODE_WRITE) | 258 | if (file->f_mode & FMODE_WRITE) |
255 | w = 1; | 259 | w = 1; |
256 | 260 | ||
261 | lock_kernel(); | ||
257 | ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); | 262 | ret = os_open_file(mixer, of_set_rw(OPENFLAGS(), r, w), 0); |
263 | unlock_kernel(); | ||
258 | 264 | ||
259 | if (ret < 0) { | 265 | if (ret < 0) { |
260 | printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', " | 266 | printk(KERN_ERR "hostaudio_open_mixdev failed to open '%s', " |