/* Called during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty's ldisc is NULL.  */
void tty_ldisc_release(struct tty_struct *tty)
/* Called during the final close of a tty or a pty pair in order to shut down the line discpline layer. On exit, each tty's ldisc is NULL.  */
void tty_ldisc_release(struct tty_struct *tty)
{
    struct tty_struct *o_tty = tty->other_struct;
    tty_ldisc_kill(tty);
    if (o_tty)
    {
        tty_ldisc_kill(o_tty);
    }
}