From: Johan Hovold Date: Sat, 8 May 2010 13:19:06 +0000 (+0200) Subject: USB: ftdi_sio: use tty_insert_flip_string_fixed_flag X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49b2597a86835a4eddcc02c7eafa2996aea58036;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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: Johan Hovold Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 14f7a34d614c..6f1c05b2bdb7 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -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; }