diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-26 18:24:05 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-16 23:27:41 -0400 |
commit | 55929332c92e5d34d65a8f784604c92677ea3e15 (patch) | |
tree | 555e922d470336d07ace32bb564ac5358379a3c4 /drivers/usb/mon | |
parent | 703c631ebbcadcfd861d01e697fdda7c388fec9a (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')
-rw-r--r-- | drivers/usb/mon/mon_bin.c | 23 | ||||
-rw-r--r-- | drivers/usb/mon/mon_stat.c | 3 |
2 files changed, 19 insertions, 7 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 | */ |
957 | static int mon_bin_ioctl(struct inode *inode, struct file *file, | 957 | static 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 | ||
1097 | static 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 |
1099 | static long mon_bin_compat_ioctl(struct file *file, | 1111 | static 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 | }; |