提交 49b2597a 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

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: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 0954e1c2
...@@ -1822,14 +1822,15 @@ static int ftdi_process_packet(struct tty_struct *tty, ...@@ -1822,14 +1822,15 @@ static int ftdi_process_packet(struct tty_struct *tty,
return 0; /* status only */ return 0; /* status only */
ch = packet + 2; ch = packet + 2;
if (!(port->port.console && port->sysrq) && flag == TTY_NORMAL) if (port->port.console && port->sysrq) {
tty_insert_flip_string(tty, ch, len);
else {
for (i = 0; i < len; i++, ch++) { for (i = 0; i < len; i++, ch++) {
if (!usb_serial_handle_sysrq_char(tty, port, *ch)) if (!usb_serial_handle_sysrq_char(tty, port, *ch))
tty_insert_flip_char(tty, *ch, flag); tty_insert_flip_char(tty, *ch, flag);
} }
} else {
tty_insert_flip_string_fixed_flag(tty, ch, flag, len);
} }
return len; return len;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册