diff options
author | Alan Cox <alan@linux.intel.com> | 2009-10-13 11:34:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 18:18:03 -0500 |
commit | 894cb91770f7794f1a17db4df2d83999b197da24 (patch) | |
tree | b8de0dd870244d986caa850c317f88be11ab84a7 | |
parent | 626875381e9ef7fde0717841edcb532033e1c7c9 (diff) |
tty: stallion: kill BKL ioctl
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/char/stallion.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/char/stallion.c b/drivers/char/stallion.c index db6dcfa35ba0..b4ba5edea33d 100644 --- a/drivers/char/stallion.c +++ b/drivers/char/stallion.c | |||
@@ -407,7 +407,7 @@ static unsigned int stl_baudrates[] = { | |||
407 | * Declare all those functions in this driver! | 407 | * Declare all those functions in this driver! |
408 | */ | 408 | */ |
409 | 409 | ||
410 | static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); | 410 | static long stl_memioctl(struct file *fp, unsigned int cmd, unsigned long arg); |
411 | static int stl_brdinit(struct stlbrd *brdp); | 411 | static int stl_brdinit(struct stlbrd *brdp); |
412 | static int stl_getportstats(struct tty_struct *tty, struct stlport *portp, comstats_t __user *cp); | 412 | static int stl_getportstats(struct tty_struct *tty, struct stlport *portp, comstats_t __user *cp); |
413 | static int stl_clrportstats(struct stlport *portp, comstats_t __user *cp); | 413 | static int stl_clrportstats(struct stlport *portp, comstats_t __user *cp); |
@@ -607,7 +607,7 @@ static unsigned int sc26198_baudtable[] = { | |||
607 | */ | 607 | */ |
608 | static const struct file_operations stl_fsiomem = { | 608 | static const struct file_operations stl_fsiomem = { |
609 | .owner = THIS_MODULE, | 609 | .owner = THIS_MODULE, |
610 | .ioctl = stl_memioctl, | 610 | .unlocked_ioctl = stl_memioctl, |
611 | }; | 611 | }; |
612 | 612 | ||
613 | static struct class *stallion_class; | 613 | static struct class *stallion_class; |
@@ -2486,18 +2486,19 @@ static int stl_getbrdstruct(struct stlbrd __user *arg) | |||
2486 | * collection. | 2486 | * collection. |
2487 | */ | 2487 | */ |
2488 | 2488 | ||
2489 | static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) | 2489 | static long stl_memioctl(struct file *fp, unsigned int cmd, unsigned long arg) |
2490 | { | 2490 | { |
2491 | int brdnr, rc; | 2491 | int brdnr, rc; |
2492 | void __user *argp = (void __user *)arg; | 2492 | void __user *argp = (void __user *)arg; |
2493 | 2493 | ||
2494 | pr_debug("stl_memioctl(ip=%p,fp=%p,cmd=%x,arg=%lx)\n", ip, fp, cmd,arg); | 2494 | pr_debug("stl_memioctl(fp=%p,cmd=%x,arg=%lx)\n", fp, cmd,arg); |
2495 | 2495 | ||
2496 | brdnr = iminor(ip); | 2496 | brdnr = iminor(fp->f_dentry->d_inode); |
2497 | if (brdnr >= STL_MAXBRDS) | 2497 | if (brdnr >= STL_MAXBRDS) |
2498 | return -ENODEV; | 2498 | return -ENODEV; |
2499 | rc = 0; | 2499 | rc = 0; |
2500 | 2500 | ||
2501 | lock_kernel(); | ||
2501 | switch (cmd) { | 2502 | switch (cmd) { |
2502 | case COM_GETPORTSTATS: | 2503 | case COM_GETPORTSTATS: |
2503 | rc = stl_getportstats(NULL, NULL, argp); | 2504 | rc = stl_getportstats(NULL, NULL, argp); |
@@ -2518,7 +2519,7 @@ static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, uns | |||
2518 | rc = -ENOIOCTLCMD; | 2519 | rc = -ENOIOCTLCMD; |
2519 | break; | 2520 | break; |
2520 | } | 2521 | } |
2521 | 2522 | unlock_kernel(); | |
2522 | return rc; | 2523 | return rc; |
2523 | } | 2524 | } |
2524 | 2525 | ||