diff options
-rw-r--r-- | net/wanrouter/wanmain.c | 6 | ||||
-rw-r--r-- | net/wanrouter/wanproc.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/net/wanrouter/wanmain.c b/net/wanrouter/wanmain.c index 9ab31a3ce3ad..b210a88d0960 100644 --- a/net/wanrouter/wanmain.c +++ b/net/wanrouter/wanmain.c | |||
@@ -350,9 +350,9 @@ __be16 wanrouter_type_trans(struct sk_buff *skb, struct net_device *dev) | |||
350 | * o execute requested action or pass command to the device driver | 350 | * o execute requested action or pass command to the device driver |
351 | */ | 351 | */ |
352 | 352 | ||
353 | int wanrouter_ioctl(struct inode *inode, struct file *file, | 353 | long wanrouter_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
354 | unsigned int cmd, unsigned long arg) | ||
355 | { | 354 | { |
355 | struct inode *inode = file->f_path.dentry->d_inode; | ||
356 | int err = 0; | 356 | int err = 0; |
357 | struct proc_dir_entry *dent; | 357 | struct proc_dir_entry *dent; |
358 | struct wan_device *wandev; | 358 | struct wan_device *wandev; |
@@ -372,6 +372,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file, | |||
372 | if (wandev->magic != ROUTER_MAGIC) | 372 | if (wandev->magic != ROUTER_MAGIC) |
373 | return -EINVAL; | 373 | return -EINVAL; |
374 | 374 | ||
375 | lock_kernel(); | ||
375 | switch (cmd) { | 376 | switch (cmd) { |
376 | case ROUTER_SETUP: | 377 | case ROUTER_SETUP: |
377 | err = wanrouter_device_setup(wandev, data); | 378 | err = wanrouter_device_setup(wandev, data); |
@@ -403,6 +404,7 @@ int wanrouter_ioctl(struct inode *inode, struct file *file, | |||
403 | err = wandev->ioctl(wandev, cmd, arg); | 404 | err = wandev->ioctl(wandev, cmd, arg); |
404 | else err = -EINVAL; | 405 | else err = -EINVAL; |
405 | } | 406 | } |
407 | unlock_kernel(); | ||
406 | return err; | 408 | return err; |
407 | } | 409 | } |
408 | 410 | ||
diff --git a/net/wanrouter/wanproc.c b/net/wanrouter/wanproc.c index 5bebe40bf4e6..267f7ff49827 100644 --- a/net/wanrouter/wanproc.c +++ b/net/wanrouter/wanproc.c | |||
@@ -278,7 +278,7 @@ static const struct file_operations wandev_fops = { | |||
278 | .read = seq_read, | 278 | .read = seq_read, |
279 | .llseek = seq_lseek, | 279 | .llseek = seq_lseek, |
280 | .release = single_release, | 280 | .release = single_release, |
281 | .ioctl = wanrouter_ioctl, | 281 | .unlocked_ioctl = wanrouter_ioctl, |
282 | }; | 282 | }; |
283 | 283 | ||
284 | /* | 284 | /* |