void n_tty_flush_buffer (struct tty_struct * tty);
Flush the input buffer. Called when the line discipline is being closed, when the tty layer wants the buffer flushed (eg at hangup) or when the N_TTY line discipline internally has to clean the pending queue (for example some signals).
tty->ctrl_status is not spinlocked and relies on lock_kernel still.