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/char/dtlk.c | |
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/char/dtlk.c')
-rw-r--r-- | drivers/char/dtlk.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/char/dtlk.c b/drivers/char/dtlk.c index 045c930e6320..e3859d4eaead 100644 --- a/drivers/char/dtlk.c +++ b/drivers/char/dtlk.c | |||
@@ -93,8 +93,8 @@ static ssize_t dtlk_write(struct file *, const char __user *, | |||
93 | static unsigned int dtlk_poll(struct file *, poll_table *); | 93 | static unsigned int dtlk_poll(struct file *, poll_table *); |
94 | static int dtlk_open(struct inode *, struct file *); | 94 | static int dtlk_open(struct inode *, struct file *); |
95 | static int dtlk_release(struct inode *, struct file *); | 95 | static int dtlk_release(struct inode *, struct file *); |
96 | static int dtlk_ioctl(struct inode *inode, struct file *file, | 96 | static long dtlk_ioctl(struct file *file, |
97 | unsigned int cmd, unsigned long arg); | 97 | unsigned int cmd, unsigned long arg); |
98 | 98 | ||
99 | static const struct file_operations dtlk_fops = | 99 | static const struct file_operations dtlk_fops = |
100 | { | 100 | { |
@@ -102,7 +102,7 @@ static const struct file_operations dtlk_fops = | |||
102 | .read = dtlk_read, | 102 | .read = dtlk_read, |
103 | .write = dtlk_write, | 103 | .write = dtlk_write, |
104 | .poll = dtlk_poll, | 104 | .poll = dtlk_poll, |
105 | .ioctl = dtlk_ioctl, | 105 | .unlocked_ioctl = dtlk_ioctl, |
106 | .open = dtlk_open, | 106 | .open = dtlk_open, |
107 | .release = dtlk_release, | 107 | .release = dtlk_release, |
108 | }; | 108 | }; |
@@ -263,10 +263,9 @@ static void dtlk_timer_tick(unsigned long data) | |||
263 | wake_up_interruptible(&dtlk_process_list); | 263 | wake_up_interruptible(&dtlk_process_list); |
264 | } | 264 | } |
265 | 265 | ||
266 | static int dtlk_ioctl(struct inode *inode, | 266 | static long dtlk_ioctl(struct file *file, |
267 | struct file *file, | 267 | unsigned int cmd, |
268 | unsigned int cmd, | 268 | unsigned long arg) |
269 | unsigned long arg) | ||
270 | { | 269 | { |
271 | char __user *argp = (char __user *)arg; | 270 | char __user *argp = (char __user *)arg; |
272 | struct dtlk_settings *sp; | 271 | struct dtlk_settings *sp; |
@@ -276,7 +275,9 @@ static int dtlk_ioctl(struct inode *inode, | |||
276 | switch (cmd) { | 275 | switch (cmd) { |
277 | 276 | ||
278 | case DTLK_INTERROGATE: | 277 | case DTLK_INTERROGATE: |
278 | lock_kernel(); | ||
279 | sp = dtlk_interrogate(); | 279 | sp = dtlk_interrogate(); |
280 | unlock_kernel(); | ||
280 | if (copy_to_user(argp, sp, sizeof(struct dtlk_settings))) | 281 | if (copy_to_user(argp, sp, sizeof(struct dtlk_settings))) |
281 | return -EINVAL; | 282 | return -EINVAL; |
282 | return 0; | 283 | return 0; |