Commit 70ced221 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: tty: fix incorrect use of tty_insert_flip_string_fixed_flag

Fix regression introduced by commit
a108bfcb (USB: tty: Prune uses of
tty_request_room in the USB layer) which broke three drivers
(cypress_m8, digi_acceleport and spcp8x5) through incorrect use of
tty_insert_flip_string_fixed_flag.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Cc: stable <stable@kernel.org>  [.34]
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 1ab83238
...@@ -1309,7 +1309,7 @@ static void cypress_read_int_callback(struct urb *urb) ...@@ -1309,7 +1309,7 @@ static void cypress_read_int_callback(struct urb *urb)
/* process read if there is data other than line status */ /* process read if there is data other than line status */
if (tty && bytes > i) { if (tty && bytes > i) {
tty_insert_flip_string_fixed_flag(tty, data + i, tty_insert_flip_string_fixed_flag(tty, data + i,
bytes - i, tty_flag); tty_flag, bytes - i);
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }
......
...@@ -1703,8 +1703,8 @@ static int digi_read_inb_callback(struct urb *urb) ...@@ -1703,8 +1703,8 @@ static int digi_read_inb_callback(struct urb *urb)
/* data length is len-1 (one byte of len is port_status) */ /* data length is len-1 (one byte of len is port_status) */
--len; --len;
if (len > 0) { if (len > 0) {
tty_insert_flip_string_fixed_flag(tty, data, len, tty_insert_flip_string_fixed_flag(tty, data, flag,
flag); len);
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }
} }
......
...@@ -726,8 +726,8 @@ static void spcp8x5_read_bulk_callback(struct urb *urb) ...@@ -726,8 +726,8 @@ static void spcp8x5_read_bulk_callback(struct urb *urb)
/* overrun is special, not associated with a char */ /* overrun is special, not associated with a char */
if (status & UART_OVERRUN_ERROR) if (status & UART_OVERRUN_ERROR)
tty_insert_flip_char(tty, 0, TTY_OVERRUN); tty_insert_flip_char(tty, 0, TTY_OVERRUN);
tty_insert_flip_string_fixed_flag(tty, data, tty_insert_flip_string_fixed_flag(tty, data, tty_flag,
urb->actual_length, tty_flag); urb->actual_length);
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }
tty_kref_put(tty); tty_kref_put(tty);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment