aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-05-08 09:19:06 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:44 -0400
commit49b2597a86835a4eddcc02c7eafa2996aea58036 (patch)
tree8686b0793202ce6ff9fa011c81b55452b57660c2 /drivers
parent0954e1c258c4018bfd370da41fbb5deb34582976 (diff)
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 <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/ftdi_sio.c7
1 files changed, 4 insertions, 3 deletions
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,
1822 return 0; /* status only */ 1822 return 0; /* status only */
1823 ch = packet + 2; 1823 ch = packet + 2;
1824 1824
1825 if (!(port->port.console && port->sysrq) && flag == TTY_NORMAL) 1825 if (port->port.console && port->sysrq) {
1826 tty_insert_flip_string(tty, ch, len);
1827 else {
1828 for (i = 0; i < len; i++, ch++) { 1826 for (i = 0; i < len; i++, ch++) {
1829 if (!usb_serial_handle_sysrq_char(tty, port, *ch)) 1827 if (!usb_serial_handle_sysrq_char(tty, port, *ch))
1830 tty_insert_flip_char(tty, *ch, flag); 1828 tty_insert_flip_char(tty, *ch, flag);
1831 } 1829 }
1830 } else {
1831 tty_insert_flip_string_fixed_flag(tty, ch, flag, len);
1832 } 1832 }
1833
1833 return len; 1834 return len;
1834} 1835}
1835 1836