aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-04-02 07:53:49 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-04-09 14:16:54 -0400
commit05eb48be91e6675c225b5f86c88ecbb83152119c (patch)
tree08bb2e98eca700f45884b93d43e4546f24948ce9 /drivers/isdn
parent1ca6711ec001c1893552f1a90007f81dff57ca7a (diff)
TTY: isdn, remove callout
I wonder how this survived there during the whole 2.6 series until now :D. Callouts are not used for a decade, so let us remove it also from isdn. This means removal of ISDN_ASYNC_CALLOUT_ACTIVE which is never raised in info->flags and callout_termios which are never used. This will help us to get rid of ISDN_ASYNC_* flags and use ASYNC ones from serial.h. And then we will switch to tty_port. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Karsten Keil <isdn@linux-pingi.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/isdn')
-rw-r--r--drivers/isdn/i4l/isdn_tty.c32
1 files changed, 6 insertions, 26 deletions
diff --git a/drivers/isdn/i4l/isdn_tty.c b/drivers/isdn/i4l/isdn_tty.c
index 1d701cd6031b..27f70923c224 100644
--- a/drivers/isdn/i4l/isdn_tty.c
+++ b/drivers/isdn/i4l/isdn_tty.c
@@ -1504,18 +1504,11 @@ isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info *
1504 */ 1504 */
1505 if ((filp->f_flags & O_NONBLOCK) || 1505 if ((filp->f_flags & O_NONBLOCK) ||
1506 (tty->flags & (1 << TTY_IO_ERROR))) { 1506 (tty->flags & (1 << TTY_IO_ERROR))) {
1507 if (info->flags & ISDN_ASYNC_CALLOUT_ACTIVE)
1508 return -EBUSY;
1509 info->flags |= ISDN_ASYNC_NORMAL_ACTIVE; 1507 info->flags |= ISDN_ASYNC_NORMAL_ACTIVE;
1510 return 0; 1508 return 0;
1511 } 1509 }
1512 if (info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) { 1510 if (tty->termios->c_cflag & CLOCAL)
1513 if (info->normal_termios.c_cflag & CLOCAL) 1511 do_clocal = 1;
1514 do_clocal = 1;
1515 } else {
1516 if (tty->termios->c_cflag & CLOCAL)
1517 do_clocal = 1;
1518 }
1519 /* 1512 /*
1520 * Block waiting for the carrier detect and the line to become 1513 * Block waiting for the carrier detect and the line to become
1521 * free (i.e., not in use by the callout). While we are in 1514 * free (i.e., not in use by the callout). While we are in
@@ -1546,8 +1539,7 @@ isdn_tty_block_til_ready(struct tty_struct *tty, struct file *filp, modem_info *
1546#endif 1539#endif
1547 break; 1540 break;
1548 } 1541 }
1549 if (!(info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) && 1542 if (!(info->flags & ISDN_ASYNC_CLOSING) &&
1550 !(info->flags & ISDN_ASYNC_CLOSING) &&
1551 (do_clocal || (info->msr & UART_MSR_DCD))) { 1543 (do_clocal || (info->msr & UART_MSR_DCD))) {
1552 break; 1544 break;
1553 } 1545 }
@@ -1670,14 +1662,6 @@ isdn_tty_close(struct tty_struct *tty, struct file *filp)
1670 return; 1662 return;
1671 } 1663 }
1672 info->flags |= ISDN_ASYNC_CLOSING; 1664 info->flags |= ISDN_ASYNC_CLOSING;
1673 /*
1674 * Save the termios structure, since this port may have
1675 * separate termios for callout and dialin.
1676 */
1677 if (info->flags & ISDN_ASYNC_NORMAL_ACTIVE)
1678 info->normal_termios = *tty->termios;
1679 if (info->flags & ISDN_ASYNC_CALLOUT_ACTIVE)
1680 info->callout_termios = *tty->termios;
1681 1665
1682 tty->closing = 1; 1666 tty->closing = 1;
1683 /* 1667 /*
@@ -1731,7 +1715,7 @@ isdn_tty_hangup(struct tty_struct *tty)
1731 return; 1715 return;
1732 isdn_tty_shutdown(info); 1716 isdn_tty_shutdown(info);
1733 info->count = 0; 1717 info->count = 0;
1734 info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE); 1718 info->flags &= ~ISDN_ASYNC_NORMAL_ACTIVE;
1735 info->tty = NULL; 1719 info->tty = NULL;
1736 wake_up_interruptible(&info->open_wait); 1720 wake_up_interruptible(&info->open_wait);
1737} 1721}
@@ -2116,8 +2100,7 @@ isdn_tty_find_icall(int di, int ch, setup_parm *setup)
2116 return (wret == 2) ? 3 : 0; 2100 return (wret == 2) ? 3 : 0;
2117} 2101}
2118 2102
2119#define TTY_IS_ACTIVE(info) \ 2103#define TTY_IS_ACTIVE(info) (info->flags & ISDN_ASYNC_NORMAL_ACTIVE)
2120 (info->flags & (ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE))
2121 2104
2122int 2105int
2123isdn_tty_stat_callback(int i, isdn_ctrl *c) 2106isdn_tty_stat_callback(int i, isdn_ctrl *c)
@@ -2628,11 +2611,8 @@ isdn_tty_modem_result(int code, modem_info *info)
2628 if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) { 2611 if ((info->flags & ISDN_ASYNC_CLOSING) || (!info->tty)) {
2629 return; 2612 return;
2630 } 2613 }
2631 if ((info->flags & ISDN_ASYNC_CHECK_CD) && 2614 if (info->flags & ISDN_ASYNC_CHECK_CD)
2632 (!((info->flags & ISDN_ASYNC_CALLOUT_ACTIVE) &&
2633 (info->flags & ISDN_ASYNC_CALLOUT_NOHUP)))) {
2634 tty_hangup(info->tty); 2615 tty_hangup(info->tty);
2635 }
2636 } 2616 }
2637} 2617}
2638 2618