aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/mISDN/timerdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/mISDN/timerdev.c')
-rw-r--r--drivers/isdn/mISDN/timerdev.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/isdn/mISDN/timerdev.c b/drivers/isdn/mISDN/timerdev.c
index 8785004e85e0..81048b8ed8ad 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
29static u_int *debug; 30static u_int *debug;
@@ -97,8 +98,6 @@ mISDN_read(struct file *filep, char __user *buf, size_t count, loff_t *off)
97 if (*debug & DEBUG_TIMER) 98 if (*debug & DEBUG_TIMER)
98 printk(KERN_DEBUG "%s(%p, %p, %d, %p)\n", __func__, 99 printk(KERN_DEBUG "%s(%p, %p, %d, %p)\n", __func__,
99 filep, buf, (int)count, off); 100 filep, buf, (int)count, off);
100 if (*off != filep->f_pos)
101 return -ESPIPE;
102 101
103 if (list_empty(&dev->expired) && (dev->work == 0)) { 102 if (list_empty(&dev->expired) && (dev->work == 0)) {
104 if (filep->f_flags & O_NONBLOCK) 103 if (filep->f_flags & O_NONBLOCK)
@@ -215,9 +214,8 @@ unlock:
215 return ret; 214 return ret;
216} 215}
217 216
218static int 217static long
219mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, 218mISDN_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
220 unsigned long arg)
221{ 219{
222 struct mISDNtimerdev *dev = filep->private_data; 220 struct mISDNtimerdev *dev = filep->private_data;
223 int id, tout, ret = 0; 221 int id, tout, ret = 0;
@@ -226,6 +224,7 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
226 if (*debug & DEBUG_TIMER) 224 if (*debug & DEBUG_TIMER)
227 printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__, 225 printk(KERN_DEBUG "%s(%p, %x, %lx)\n", __func__,
228 filep, cmd, arg); 226 filep, cmd, arg);
227 lock_kernel();
229 switch (cmd) { 228 switch (cmd) {
230 case IMADDTIMER: 229 case IMADDTIMER:
231 if (get_user(tout, (int __user *)arg)) { 230 if (get_user(tout, (int __user *)arg)) {
@@ -257,13 +256,14 @@ mISDN_ioctl(struct inode *inode, struct file *filep, unsigned int cmd,
257 default: 256 default:
258 ret = -EINVAL; 257 ret = -EINVAL;
259 } 258 }
259 unlock_kernel();
260 return ret; 260 return ret;
261} 261}
262 262
263static const struct file_operations mISDN_fops = { 263static const struct file_operations mISDN_fops = {
264 .read = mISDN_read, 264 .read = mISDN_read,
265 .poll = mISDN_poll, 265 .poll = mISDN_poll,
266 .ioctl = mISDN_ioctl, 266 .unlocked_ioctl = mISDN_ioctl,
267 .open = mISDN_open, 267 .open = mISDN_open,
268 .release = mISDN_close, 268 .release = mISDN_close,
269}; 269};