]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/wanrouter/wanmain.c
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/holtmann/bluet...
[linux-2.6-omap-h63xx.git] / net / wanrouter / wanmain.c
index 849cc06bd9141a62da44061a230e7bc70c472761..b210a88d09608f5d776bf4e5196fcfe71adf7ad0 100644 (file)
@@ -46,7 +46,6 @@
 #include <linux/capability.h>
 #include <linux/errno.h>       /* return codes */
 #include <linux/kernel.h>
-#include <linux/init.h>
 #include <linux/module.h>      /* support for loadable modules */
 #include <linux/slab.h>                /* kmalloc(), kfree() */
 #include <linux/mm.h>
@@ -351,9 +350,9 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev)
  *     o execute requested action or pass command to the device driver
  */
 
-int wanrouter_ioctl(struct inode *inode, struct file *file,
-               unsigned int cmd, unsigned long arg)
+long wanrouter_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
+       struct inode *inode = file->f_path.dentry->d_inode;
        int err = 0;
        struct proc_dir_entry *dent;
        struct wan_device *wandev;
@@ -373,6 +372,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file,
        if (wandev->magic != ROUTER_MAGIC)
                return -EINVAL;
 
+       lock_kernel();
        switch (cmd) {
        case ROUTER_SETUP:
                err = wanrouter_device_setup(wandev, data);
@@ -404,6 +404,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file,
                        err = wandev->ioctl(wandev, cmd, arg);
                else err = -EINVAL;
        }
+       unlock_kernel();
        return err;
 }