aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/mon/mon_bin.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-04-26 18:24:05 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-05-16 23:27:41 -0400
commit55929332c92e5d34d65a8f784604c92677ea3e15 (patch)
tree555e922d470336d07ace32bb564ac5358379a3c4 /drivers/usb/mon/mon_bin.c
parent703c631ebbcadcfd861d01e697fdda7c388fec9a (diff)
drivers: Push down BKL into various drivers
These are the last remaining device drivers using the ->ioctl file operation in the drivers directory (except from v4l drivers). [fweisbec: drop i8k pushdown as it has been done from procfs pushdown branch already] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers/usb/mon/mon_bin.c')
-rw-r--r--drivers/usb/mon/mon_bin.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index ddf7f9a1b336..55947725f609 100644
--- a/drivers/usb/mon/mon_bin.c
+++ b/drivers/usb/mon/mon_bin.c
@@ -954,8 +954,7 @@ static int mon_bin_queued(struct mon_reader_bin *rp)
954 954
955/* 955/*
956 */ 956 */
957static int mon_bin_ioctl(struct inode *inode, struct file *file, 957static int mon_bin_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
958 unsigned int cmd, unsigned long arg)
959{ 958{
960 struct mon_reader_bin *rp = file->private_data; 959 struct mon_reader_bin *rp = file->private_data;
961 // struct mon_bus* mbus = rp->r.m_bus; 960 // struct mon_bus* mbus = rp->r.m_bus;
@@ -1095,6 +1094,19 @@ static int mon_bin_ioctl(struct inode *inode, struct file *file,
1095 return ret; 1094 return ret;
1096} 1095}
1097 1096
1097static long mon_bin_unlocked_ioctl(struct file *file, unsigned int cmd,
1098 unsigned long arg)
1099{
1100 int ret;
1101
1102 lock_kernel();
1103 ret = mon_bin_ioctl(file, cmd, arg);
1104 unlock_kernel();
1105
1106 return ret;
1107}
1108
1109
1098#ifdef CONFIG_COMPAT 1110#ifdef CONFIG_COMPAT
1099static long mon_bin_compat_ioctl(struct file *file, 1111static long mon_bin_compat_ioctl(struct file *file,
1100 unsigned int cmd, unsigned long arg) 1112 unsigned int cmd, unsigned long arg)
@@ -1148,14 +1160,13 @@ static long mon_bin_compat_ioctl(struct file *file,
1148 return 0; 1160 return 0;
1149 1161
1150 case MON_IOCG_STATS: 1162 case MON_IOCG_STATS:
1151 return mon_bin_ioctl(NULL, file, cmd, 1163 return mon_bin_ioctl(file, cmd, (unsigned long) compat_ptr(arg));
1152 (unsigned long) compat_ptr(arg));
1153 1164
1154 case MON_IOCQ_URB_LEN: 1165 case MON_IOCQ_URB_LEN:
1155 case MON_IOCQ_RING_SIZE: 1166 case MON_IOCQ_RING_SIZE:
1156 case MON_IOCT_RING_SIZE: 1167 case MON_IOCT_RING_SIZE:
1157 case MON_IOCH_MFLUSH: 1168 case MON_IOCH_MFLUSH:
1158 return mon_bin_ioctl(NULL, file, cmd, arg); 1169 return mon_bin_ioctl(file, cmd, arg);
1159 1170
1160 default: 1171 default:
1161 ; 1172 ;
@@ -1239,7 +1250,7 @@ static const struct file_operations mon_fops_binary = {
1239 .read = mon_bin_read, 1250 .read = mon_bin_read,
1240 /* .write = mon_text_write, */ 1251 /* .write = mon_text_write, */
1241 .poll = mon_bin_poll, 1252 .poll = mon_bin_poll,
1242 .ioctl = mon_bin_ioctl, 1253 .unlocked_ioctl = mon_bin_unlocked_ioctl,
1243#ifdef CONFIG_COMPAT 1254#ifdef CONFIG_COMPAT
1244 .compat_ioctl = mon_bin_compat_ioctl, 1255 .compat_ioctl = mon_bin_compat_ioctl,
1245#endif 1256#endif