aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2010-08-05 05:17:04 -0400
committerTakashi Iwai <tiwai@suse.de>2010-08-05 05:17:04 -0400
commit74bf40f0793fed9e01eb6164c2ce63e8c27ca205 (patch)
treef41312c0943978842ac258873b29da04d72d0625 /arch/um
parente71981343ad29b5d929f82ac56c0b27b8ea0e540 (diff)
parentc4685849b4d725ab80cd29f5e09f5f128b4724b5 (diff)
Merge branch 'topic/misc' into for-linus
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/drivers/hostaudio_kern.c6
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', "