aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2008-04-30 03:53:22 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:39 -0400
commit638157bc1461f6718eeca06bedd9a09cf1f35c36 (patch)
treea8ef1f3ecbe0904f5c1341438bd3b079c8ff0eb7 /drivers
parentbdf183aa47dcb46782e22ebd4d1061e47ad74b14 (diff)
serial167: prepare to push BKL down into drivers
Kill the softcar handlers again, wrap the ioctl handler in the BKL Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/serial167.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/char/serial167.c b/drivers/char/serial167.c
index df8cd0ca97eb..f62fb9360c3f 100644
--- a/drivers/char/serial167.c
+++ b/drivers/char/serial167.c
@@ -1539,6 +1539,8 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
1539 printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */ 1539 printk("cy_ioctl %s, cmd = %x arg = %lx\n", tty->name, cmd, arg); /* */
1540#endif 1540#endif
1541 1541
1542 lock_kernel();
1543
1542 switch (cmd) { 1544 switch (cmd) {
1543 case CYGETMON: 1545 case CYGETMON:
1544 ret_val = get_mon_info(info, argp); 1546 ret_val = get_mon_info(info, argp);
@@ -1584,18 +1586,6 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
1584 break; 1586 break;
1585 1587
1586/* The following commands are incompletely implemented!!! */ 1588/* The following commands are incompletely implemented!!! */
1587 case TIOCGSOFTCAR:
1588 ret_val =
1589 put_user(C_CLOCAL(tty) ? 1 : 0,
1590 (unsigned long __user *)argp);
1591 break;
1592 case TIOCSSOFTCAR:
1593 ret_val = get_user(val, (unsigned long __user *)argp);
1594 if (ret_val)
1595 break;
1596 tty->termios->c_cflag =
1597 ((tty->termios->c_cflag & ~CLOCAL) | (val ? CLOCAL : 0));
1598 break;
1599 case TIOCGSERIAL: 1589 case TIOCGSERIAL:
1600 ret_val = get_serial_info(info, argp); 1590 ret_val = get_serial_info(info, argp);
1601 break; 1591 break;
@@ -1605,6 +1595,7 @@ cy_ioctl(struct tty_struct *tty, struct file *file,
1605 default: 1595 default:
1606 ret_val = -ENOIOCTLCMD; 1596 ret_val = -ENOIOCTLCMD;
1607 } 1597 }
1598 unlock_kernel();
1608 1599
1609#ifdef SERIAL_DEBUG_OTHER 1600#ifdef SERIAL_DEBUG_OTHER
1610 printk("cy_ioctl done\n"); 1601 printk("cy_ioctl done\n");