aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/megaraid/megaraid_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/megaraid/megaraid_mm.c')
-rw-r--r--drivers/scsi/megaraid/megaraid_mm.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/scsi/megaraid/megaraid_mm.c b/drivers/scsi/megaraid/megaraid_mm.c
index 36e0b7d05c1d..41f82f76d884 100644
--- a/drivers/scsi/megaraid/megaraid_mm.c
+++ b/drivers/scsi/megaraid/megaraid_mm.c
@@ -22,7 +22,7 @@
22 22
23// Entry points for char node driver 23// Entry points for char node driver
24static int mraid_mm_open(struct inode *, struct file *); 24static int mraid_mm_open(struct inode *, struct file *);
25static int mraid_mm_ioctl(struct inode *, struct file *, uint, unsigned long); 25static long mraid_mm_unlocked_ioctl(struct file *, uint, unsigned long);
26 26
27 27
28// routines to convert to and from the old the format 28// routines to convert to and from the old the format
@@ -70,7 +70,7 @@ static wait_queue_head_t wait_q;
70 70
71static const struct file_operations lsi_fops = { 71static const struct file_operations lsi_fops = {
72 .open = mraid_mm_open, 72 .open = mraid_mm_open,
73 .ioctl = mraid_mm_ioctl, 73 .unlocked_ioctl = mraid_mm_unlocked_ioctl,
74#ifdef CONFIG_COMPAT 74#ifdef CONFIG_COMPAT
75 .compat_ioctl = mraid_mm_compat_ioctl, 75 .compat_ioctl = mraid_mm_compat_ioctl,
76#endif 76#endif
@@ -110,8 +110,7 @@ mraid_mm_open(struct inode *inode, struct file *filep)
110 * @arg : user ioctl packet 110 * @arg : user ioctl packet
111 */ 111 */
112static int 112static int
113mraid_mm_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, 113mraid_mm_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
114 unsigned long arg)
115{ 114{
116 uioc_t *kioc; 115 uioc_t *kioc;
117 char signature[EXT_IOCTL_SIGN_SZ] = {0}; 116 char signature[EXT_IOCTL_SIGN_SZ] = {0};
@@ -218,6 +217,19 @@ mraid_mm_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
218 return rval; 217 return rval;
219} 218}
220 219
220static long
221mraid_mm_unlocked_ioctl(struct file *filep, unsigned int cmd,
222 unsigned long arg)
223{
224 int err;
225
226 /* inconsistant: mraid_mm_compat_ioctl doesn't take the BKL */
227 lock_kernel();
228 err = mraid_mm_ioctl(filep, cmd, arg);
229 unlock_kernel();
230
231 return err;
232}
221 233
222/** 234/**
223 * mraid_mm_get_adapter - Returns corresponding adapters for the mimd packet 235 * mraid_mm_get_adapter - Returns corresponding adapters for the mimd packet
@@ -1225,7 +1237,7 @@ mraid_mm_compat_ioctl(struct file *filep, unsigned int cmd,
1225{ 1237{
1226 int err; 1238 int err;
1227 1239
1228 err = mraid_mm_ioctl(NULL, filep, cmd, arg); 1240 err = mraid_mm_ioctl(filep, cmd, arg);
1229 1241
1230 return err; 1242 return err;
1231} 1243}