diff options
author | 2017-04-03 11:58:55 +0200 | |
---|---|---|
committer | 2017-04-10 09:42:00 +0200 | |
commit | 185fcb3fbe6d32d894b8b72429622d91c59b10f6 (patch) | |
tree | dee70ce372e4f4bb2fea265b4398a7f699dd6618 /drivers/usb/serial | |
parent | USB: serial: iuu_phoenix: drop excessive sanity checks (diff) | |
download | linux-185fcb3fbe6d32d894b8b72429622d91c59b10f6.tar.gz linux-185fcb3fbe6d32d894b8b72429622d91c59b10f6.tar.bz2 linux-185fcb3fbe6d32d894b8b72429622d91c59b10f6.zip |
USB: serial: quatech2: drop redundant tty_buffer_request_room
Drop redundant calls to tty_buffer_request_room and use the more
efficient tty_insert_flip_char when inserting single characters.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r-- | drivers/usb/serial/quatech2.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/serial/quatech2.c b/drivers/usb/serial/quatech2.c index 6ddcaa2de902..60e17d1444c3 100644 --- a/drivers/usb/serial/quatech2.c +++ b/drivers/usb/serial/quatech2.c @@ -601,7 +601,6 @@ static void qt2_process_read_urb(struct urb *urb) escapeflag = true; break; case QT2_CONTROL_ESCAPE: - tty_buffer_request_room(&port->port, 2); tty_insert_flip_string(&port->port, ch, 2); i += 2; escapeflag = true; @@ -616,8 +615,7 @@ static void qt2_process_read_urb(struct urb *urb) continue; } - tty_buffer_request_room(&port->port, 1); - tty_insert_flip_string(&port->port, ch, 1); + tty_insert_flip_char(&port->port, *ch, TTY_NORMAL); } tty_flip_buffer_push(&port->port); |