/* Perform final close of the ldisc and reset tty->ldisc  */
void tty_ldisc_kill(struct tty_struct *tty)
/* Perform final close of the ldisc and reset tty->ldisc  */
void tty_ldisc_kill(struct tty_struct *tty)
{
    if (tty && tty->ldisc)
    {
        tty_ldisc_close(tty, tty->ldisc);
        tty_ldisc_put(tty->ldisc);
        tty->ldisc = NULL;
    }
}