/* Called by the driver to find out how much data it is permitted to feed to the line discipline without any being lost and thus to manage flow control. Not serialized. Answers for the "instant".  */
static void n_tty_set_room(struct tty_struct *tty)
/* Called by the driver to find out how much data it is permitted to feed to the line discipline without any being lost and thus to manage flow control. Not serialized. Answers for the "instant".  */
static void n_tty_set_room(struct tty_struct *tty)
{
	int	left = N_TTY_BUF_SIZE - tty->read_cnt - 1;
	if (left <= 0)
		left = tty->icanon && !tty->canon_data;
	tty->receive_room = left;
}