diff options
Diffstat (limited to 'sound/oss/sh_dac_audio.c')
-rw-r--r-- | sound/oss/sh_dac_audio.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c index 4153752507e..8f0be4053a5 100644 --- a/sound/oss/sh_dac_audio.c +++ b/sound/oss/sh_dac_audio.c @@ -16,6 +16,7 @@ #include <linux/slab.h> #include <linux/fs.h> #include <linux/sound.h> +#include <linux/smp_lock.h> #include <linux/soundcard.h> #include <linux/interrupt.h> #include <linux/hrtimer.h> @@ -216,13 +217,17 @@ static int dac_audio_open(struct inode *inode, struct file *file) { if (file->f_mode & FMODE_READ) return -ENODEV; - if (in_use) + + lock_kernel(); + if (in_use) { + unlock_kernel(); return -EBUSY; + } in_use = 1; dac_audio_start(); - + unlock_kernel(); return 0; } |