Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97ef38b8 authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman
Browse files

tty: Replace TTY_THROTTLED bit tests with tty_throttled()



Abstract TTY_THROTTLED bit tests with tty_throttled().

Signed-off-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 18900ca6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2316,7 +2316,7 @@ static void mgslpc_set_termios(struct tty_struct *tty, struct ktermios *old_term
	/* Handle transition away from B0 status */
	if (!(old_termios->c_cflag & CBAUD) && C_BAUD(tty)) {
		info->serial_signals |= SerialSignal_DTR;
		if (!C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags))
		if (!C_CRTSCTS(tty) || !tty_throttled(tty))
			info->serial_signals |= SerialSignal_RTS;
		spin_lock_irqsave(&info->lock, flags);
		set_signals(info);
+1 −1
Original line number Diff line number Diff line
@@ -895,7 +895,7 @@ static void sdio_uart_set_termios(struct tty_struct *tty,
	/* Handle transition away from B0 status */
	if (!(old_termios->c_cflag & CBAUD) && (cflag & CBAUD)) {
		unsigned int mask = TIOCM_DTR;
		if (!(cflag & CRTSCTS) || !test_bit(TTY_THROTTLED, &tty->flags))
		if (!(cflag & CRTSCTS) || !tty_throttled(tty))
			mask |= TIOCM_RTS;
		sdio_uart_set_mctrl(port, mask);
	}
+1 −1
Original line number Diff line number Diff line
@@ -2029,7 +2029,7 @@ static int put_rxbuf_data(struct urb *urb, struct hso_serial *serial)

	tty = tty_port_tty_get(&serial->port);

	if (tty && test_bit(TTY_THROTTLED, &tty->flags)) {
	if (tty && tty_throttled(tty)) {
		tty_kref_put(tty);
		return -1;
	}
+1 −1
Original line number Diff line number Diff line
@@ -1305,7 +1305,7 @@ static void fwtty_set_termios(struct tty_struct *tty, struct ktermios *old)
	if ((baud == 0) && (old->c_cflag & CBAUD)) {
		port->mctrl &= ~(TIOCM_DTR | TIOCM_RTS);
	} else if ((baud != 0) && !(old->c_cflag & CBAUD)) {
		if (C_CRTSCTS(tty) || !test_bit(TTY_THROTTLED, &tty->flags))
		if (C_CRTSCTS(tty) || !tty_throttled(tty))
			port->mctrl |= TIOCM_DTR | TIOCM_RTS;
		else
			port->mctrl |= TIOCM_DTR;
+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ static void __speakup_paste_selection(struct work_struct *work)
	add_wait_queue(&vc->paste_wait, &wait);
	while (sel_buffer && sel_buffer_lth > pasted) {
		set_current_state(TASK_INTERRUPTIBLE);
		if (test_bit(TTY_THROTTLED, &tty->flags)) {
		if (tty_throttled(tty)) {
			schedule();
			continue;
		}
Loading