aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/divert/divert_procfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/divert/divert_procfs.c')
-rw-r--r--drivers/isdn/divert/divert_procfs.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/isdn/divert/divert_procfs.c b/drivers/isdn/divert/divert_procfs.c
index 9f49d9065791..c53e2417e7d4 100644
--- a/drivers/isdn/divert/divert_procfs.c
+++ b/drivers/isdn/divert/divert_procfs.c
@@ -20,6 +20,7 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include <linux/isdnif.h> 21#include <linux/isdnif.h>
22#include <net/net_namespace.h> 22#include <net/net_namespace.h>
23#include <linux/smp_lock.h>
23#include "isdn_divert.h" 24#include "isdn_divert.h"
24 25
25 26
@@ -177,9 +178,7 @@ isdn_divert_close(struct inode *ino, struct file *filep)
177/*********/ 178/*********/
178/* IOCTL */ 179/* IOCTL */
179/*********/ 180/*********/
180static int 181static int isdn_divert_ioctl_unlocked(struct file *file, uint cmd, ulong arg)
181isdn_divert_ioctl(struct inode *inode, struct file *file,
182 uint cmd, ulong arg)
183{ 182{
184 divert_ioctl dioctl; 183 divert_ioctl dioctl;
185 int i; 184 int i;
@@ -258,6 +257,17 @@ isdn_divert_ioctl(struct inode *inode, struct file *file,
258 return copy_to_user((void __user *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0; 257 return copy_to_user((void __user *)arg, &dioctl, sizeof(dioctl)) ? -EFAULT : 0;
259} /* isdn_divert_ioctl */ 258} /* isdn_divert_ioctl */
260 259
260static long isdn_divert_ioctl(struct file *file, uint cmd, ulong arg)
261{
262 long ret;
263
264 lock_kernel();
265 ret = isdn_divert_ioctl_unlocked(file, cmd, arg);
266 unlock_kernel();
267
268 return ret;
269}
270
261static const struct file_operations isdn_fops = 271static const struct file_operations isdn_fops =
262{ 272{
263 .owner = THIS_MODULE, 273 .owner = THIS_MODULE,
@@ -265,7 +275,7 @@ static const struct file_operations isdn_fops =
265 .read = isdn_divert_read, 275 .read = isdn_divert_read,
266 .write = isdn_divert_write, 276 .write = isdn_divert_write,
267 .poll = isdn_divert_poll, 277 .poll = isdn_divert_poll,
268 .ioctl = isdn_divert_ioctl, 278 .unlocked_ioctl = isdn_divert_ioctl,
269 .open = isdn_divert_open, 279 .open = isdn_divert_open,
270 .release = isdn_divert_close, 280 .release = isdn_divert_close,
271}; 281};