diff options
author | Johan Hovold <jhovold@gmail.com> | 2010-05-08 09:18:41 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-05-20 16:21:44 -0400 |
commit | d45cc8df7f59eb4db28408076ce979cd5e18f2b7 (patch) | |
tree | a41e5e65207c77346fc818cb411d20ef39ad283d /drivers/usb/serial | |
parent | 49b2597a86835a4eddcc02c7eafa2996aea58036 (diff) |
USB: pl2303: 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/usb/serial')
-rw-r--r-- | drivers/usb/serial/pl2303.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 18d1c44faa51..6b6001822279 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c | |||
@@ -786,12 +786,13 @@ static void pl2303_process_read_urb(struct urb *urb) | |||
786 | if (line_status & UART_OVERRUN_ERROR) | 786 | if (line_status & UART_OVERRUN_ERROR) |
787 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 787 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); |
788 | 788 | ||
789 | if (tty_flag == TTY_NORMAL && !(port->port.console && port->sysrq)) | 789 | if (port->port.console && port->sysrq) { |
790 | tty_insert_flip_string(tty, data, urb->actual_length); | ||
791 | else { | ||
792 | for (i = 0; i < urb->actual_length; ++i) | 790 | for (i = 0; i < urb->actual_length; ++i) |
793 | if (!usb_serial_handle_sysrq_char(tty, port, data[i])) | 791 | if (!usb_serial_handle_sysrq_char(tty, port, data[i])) |
794 | tty_insert_flip_char(tty, data[i], tty_flag); | 792 | tty_insert_flip_char(tty, data[i], tty_flag); |
793 | } else { | ||
794 | tty_insert_flip_string_fixed_flag(tty, data, tty_flag, | ||
795 | urb->actual_length); | ||
795 | } | 796 | } |
796 | 797 | ||
797 | tty_flip_buffer_push(tty); | 798 | tty_flip_buffer_push(tty); |