aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers/hostaudio_kern.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/um/drivers/hostaudio_kern.c')
-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', "