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

Commit 49b2597a authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman
Browse files

USB: ftdi_sio: use tty_insert_flip_string_fixed_flag



Use tty_insert_flip_string_fixed_flag to report errors to line
discipline.

Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 0954e1c2
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -1822,14 +1822,15 @@ static int ftdi_process_packet(struct tty_struct *tty,
		return 0;	/* status only */
	ch = packet + 2;

	if (!(port->port.console && port->sysrq) && flag == TTY_NORMAL)
		tty_insert_flip_string(tty, ch, len);
	else {
	if (port->port.console && port->sysrq) {
		for (i = 0; i < len; i++, ch++) {
			if (!usb_serial_handle_sysrq_char(tty, port, *ch))
				tty_insert_flip_char(tty, *ch, flag);
		}
	} else {
		tty_insert_flip_string_fixed_flag(tty, ch, flag, len);
	}

	return len;
}