aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-10-13 11:34:15 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 18:18:03 -0500
commit894cb91770f7794f1a17db4df2d83999b197da24 (patch)
treeb8de0dd870244d986caa850c317f88be11ab84a7 /drivers/char
parent626875381e9ef7fde0717841edcb532033e1c7c9 (diff)
tty: stallion: kill BKL ioctl
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/stallion.c13
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
410static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg); 410static long stl_memioctl(struct file *fp, unsigned int cmd, unsigned long arg);
411static int stl_brdinit(struct stlbrd *brdp); 411static int stl_brdinit(struct stlbrd *brdp);
412static int stl_getportstats(struct tty_struct *tty, struct stlport *portp, comstats_t __user *cp); 412static int stl_getportstats(struct tty_struct *tty, struct stlport *portp, comstats_t __user *cp);
413static int stl_clrportstats(struct stlport *portp, comstats_t __user *cp); 413static int stl_clrportstats(struct stlport *portp, comstats_t __user *cp);
@@ -607,7 +607,7 @@ static unsigned int sc26198_baudtable[] = {
607 */ 607 */
608static const struct file_operations stl_fsiomem = { 608static 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
613static struct class *stallion_class; 613static struct class *stallion_class;
@@ -2486,18 +2486,19 @@ static int stl_getbrdstruct(struct stlbrd __user *arg)
2486 * collection. 2486 * collection.
2487 */ 2487 */
2488 2488
2489static int stl_memioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) 2489static 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