aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/sh_dac_audio.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/sh_dac_audio.c')
-rw-r--r--sound/oss/sh_dac_audio.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/oss/sh_dac_audio.c b/sound/oss/sh_dac_audio.c
index 4153752507e3..8f0be4053a5a 100644
--- a/sound/oss/sh_dac_audio.c
+++ b/sound/oss/sh_dac_audio.c
@@ -16,6 +16,7 @@
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/fs.h> 17#include <linux/fs.h>
18#include <linux/sound.h> 18#include <linux/sound.h>
19#include <linux/smp_lock.h>
19#include <linux/soundcard.h> 20#include <linux/soundcard.h>
20#include <linux/interrupt.h> 21#include <linux/interrupt.h>
21#include <linux/hrtimer.h> 22#include <linux/hrtimer.h>
@@ -216,13 +217,17 @@ static int dac_audio_open(struct inode *inode, struct file *file)
216{ 217{
217 if (file->f_mode & FMODE_READ) 218 if (file->f_mode & FMODE_READ)
218 return -ENODEV; 219 return -ENODEV;
219 if (in_use) 220
221 lock_kernel();
222 if (in_use) {
223 unlock_kernel();
220 return -EBUSY; 224 return -EBUSY;
225 }
221 226
222 in_use = 1; 227 in_use = 1;
223 228
224 dac_audio_start(); 229 dac_audio_start();
225 230 unlock_kernel();
226 return 0; 231 return 0;
227} 232}
228 233