diff options
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mm.c')
-rw-r--r-- | drivers/scsi/megaraid/megaraid_mm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c index 41f82f76d884..42770a1e7b8a 100644 --- a/drivers/scsi/megaraid/megaraid_mm.c +++ b/drivers/scsi/megaraid/megaraid_mm.c | |||
@@ -16,11 +16,12 @@ | |||
16 | */ | 16 | */ |
17 | #include <linux/sched.h> | 17 | #include <linux/sched.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/smp_lock.h> | 19 | #include <linux/mutex.h> |
20 | #include "megaraid_mm.h" | 20 | #include "megaraid_mm.h" |
21 | 21 | ||
22 | 22 | ||
23 | // Entry points for char node driver | 23 | // Entry points for char node driver |
24 | static DEFINE_MUTEX(mraid_mm_mutex); | ||
24 | static int mraid_mm_open(struct inode *, struct file *); | 25 | static int mraid_mm_open(struct inode *, struct file *); |
25 | static long mraid_mm_unlocked_ioctl(struct file *, uint, unsigned long); | 26 | static long mraid_mm_unlocked_ioctl(struct file *, uint, unsigned long); |
26 | 27 | ||
@@ -98,7 +99,6 @@ mraid_mm_open(struct inode *inode, struct file *filep) | |||
98 | */ | 99 | */ |
99 | if (!capable(CAP_SYS_ADMIN)) return (-EACCES); | 100 | if (!capable(CAP_SYS_ADMIN)) return (-EACCES); |
100 | 101 | ||
101 | cycle_kernel_lock(); | ||
102 | return 0; | 102 | return 0; |
103 | } | 103 | } |
104 | 104 | ||
@@ -224,9 +224,9 @@ mraid_mm_unlocked_ioctl(struct file *filep, unsigned int cmd, | |||
224 | int err; | 224 | int err; |
225 | 225 | ||
226 | /* inconsistant: mraid_mm_compat_ioctl doesn't take the BKL */ | 226 | /* inconsistant: mraid_mm_compat_ioctl doesn't take the BKL */ |
227 | lock_kernel(); | 227 | mutex_lock(&mraid_mm_mutex); |
228 | err = mraid_mm_ioctl(filep, cmd, arg); | 228 | err = mraid_mm_ioctl(filep, cmd, arg); |
229 | unlock_kernel(); | 229 | mutex_unlock(&mraid_mm_mutex); |
230 | 230 | ||
231 | return err; | 231 | return err; |
232 | } | 232 | } |