aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 11:01:10 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-24 11:01:10 -0400
commitf13771187b9423b824f32518319f6da85d819003 (patch)
treec431cf16c286065a302d5f3fb43fc1abac7e4047 /drivers/usb
parent15953654cc312429740fd58fb37a5a3d63a54376 (diff)
parent9f37af654fda88a8dcca74c785f6c20e52758866 (diff)
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: uml: Pushdown the bkl from harddog_kern ioctl sunrpc: Pushdown the bkl from sunrpc cache ioctl sunrpc: Pushdown the bkl from ioctl autofs4: Pushdown the bkl from ioctl uml: Convert to unlocked_ioctls to remove implicit BKL ncpfs: BKL ioctl pushdown coda: Clean-up whitespace problems in pioctl.c coda: BKL ioctl pushdown drivers: Push down BKL into various drivers isdn: Push down BKL into ioctl functions scsi: Push down BKL into ioctl functions dvb: Push down BKL into ioctl functions smbfs: Push down BKL into ioctl function coda/psdev: Remove BKL from ioctl function um/mmapper: Remove BKL usage sn_hwperf: Kill BKL usage hfsplus: Push down BKL into ioctl function
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/mon/mon_bin.c23
-rw-r--r--drivers/usb/mon/mon_stat.c3
2 files changed, 19 insertions, 7 deletions
diff --git a/drivers/usb/mon/mon_bin.c b/drivers/usb/mon/mon_bin.c
index e7fa3644ba6a..61c76b13f0f1 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
diff --git a/drivers/usb/mon/mon_stat.c b/drivers/usb/mon/mon_stat.c
index 1becdc3837e6..8ec94f15a738 100644
--- a/drivers/usb/mon/mon_stat.c
+++ b/drivers/usb/mon/mon_stat.c
@@ -11,6 +11,7 @@
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/usb.h> 12#include <linux/usb.h>
13#include <linux/fs.h> 13#include <linux/fs.h>
14#include <linux/smp_lock.h>
14#include <asm/uaccess.h> 15#include <asm/uaccess.h>
15 16
16#include "usb_mon.h" 17#include "usb_mon.h"
@@ -63,6 +64,6 @@ const struct file_operations mon_fops_stat = {
63 .read = mon_stat_read, 64 .read = mon_stat_read,
64 /* .write = mon_stat_write, */ 65 /* .write = mon_stat_write, */
65 /* .poll = mon_stat_poll, */ 66 /* .poll = mon_stat_poll, */
66 /* .ioctl = mon_stat_ioctl, */ 67 /* .unlocked_ioctl = mon_stat_ioctl, */
67 .release = mon_stat_release, 68 .release = mon_stat_release,
68}; 69};