diff options
Diffstat (limited to 'drivers/isdn/mISDN/timerdev.c')
-rw-r--r-- | drivers/isdn/mISDN/timerdev.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c index 8785004e85e0..c3243c913ec0 100644 --- a/drivers/isdn/mISDN/timerdev.c +++ b/drivers/isdn/mISDN/timerdev.c | |||
@@ -24,6 +24,7 @@ | |||
24 | #include <linux/miscdevice.h> | 24 | #include <linux/miscdevice.h> |
25 | #include <linux/module.h> | 25 | #include <linux/module.h> |
26 | #include <linux/mISDNif.h> | 26 | #include <linux/mISDNif.h> |
27 | #include <linux/smp_lock.h> | ||
27 | #include "core.h" | 28 | #include "core.h" |
28 | 29 | ||
29 | static u_int *debug; | 30 | static u_int *debug; |
@@ -215,9 +216,8 @@ unlock: | |||
215 | return ret; | 216 | return ret; |
216 | } | 217 | } |
217 | 218 | ||
218 | static int | 219 | static long |
219 | mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | 220 | mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg) |
220 | unsigned long arg) | ||
221 | { | 221 | { |
222 | struct mISDNtimerdev *dev = filep->private_data; | 222 | struct mISDNtimerdev *dev = filep->private_data; |
223 | int id, tout, ret = 0; | 223 | int id, tout, ret = 0; |
@@ -226,6 +226,7 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
226 | if (*debug & DEBUG_TIMER) | 226 | if (*debug & DEBUG_TIMER) |
227 | printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__, | 227 | printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__, |
228 | filep, cmd, arg); | 228 | filep, cmd, arg); |
229 | lock_kernel(); | ||
229 | switch (cmd) { | 230 | switch (cmd) { |
230 | case IMADDTIMER: | 231 | case IMADDTIMER: |
231 | if (get_user(tout, (int __user *)arg)) { | 232 | if (get_user(tout, (int __user *)arg)) { |
@@ -257,13 +258,14 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, | |||
257 | default: | 258 | default: |
258 | ret = -EINVAL; | 259 | ret = -EINVAL; |
259 | } | 260 | } |
261 | unlock_kernel(); | ||
260 | return ret; | 262 | return ret; |
261 | } | 263 | } |
262 | 264 | ||
263 | static const struct file_operations mISDN_fops = { | 265 | static const struct file_operations mISDN_fops = { |
264 | .read = mISDN_read, | 266 | .read = mISDN_read, |
265 | .poll = mISDN_poll, | 267 | .poll = mISDN_poll, |
266 | .ioctl = mISDN_ioctl, | 268 | .unlocked_ioctl = mISDN_ioctl, |
267 | .open = mISDN_open, | 269 | .open = mISDN_open, |
268 | .release = mISDN_close, | 270 | .release = mISDN_close, |
269 | }; | 271 | }; |