diff options
Diffstat (limited to 'drivers/usb/serial/cypress_m8.c')
-rw-r--r-- | drivers/usb/serial/cypress_m8.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/usb/serial/cypress_m8.c b/drivers/usb/serial/cypress_m8.c index 4e9637eb6137..68067fe117a4 100644 --- a/drivers/usb/serial/cypress_m8.c +++ b/drivers/usb/serial/cypress_m8.c | |||
@@ -1263,12 +1263,10 @@ static void cypress_read_int_callback(struct urb *urb, struct pt_regs *regs) | |||
1263 | 1263 | ||
1264 | /* process read if there is data other than line status */ | 1264 | /* process read if there is data other than line status */ |
1265 | if (tty && (bytes > i)) { | 1265 | if (tty && (bytes > i)) { |
1266 | bytes = tty_buffer_request_room(tty, bytes); | ||
1266 | for (; i < bytes ; ++i) { | 1267 | for (; i < bytes ; ++i) { |
1267 | dbg("pushing byte number %d - %d - %c", i, data[i], | 1268 | dbg("pushing byte number %d - %d - %c", i, data[i], |
1268 | data[i]); | 1269 | data[i]); |
1269 | if(tty->flip.count >= TTY_FLIPBUF_SIZE) { | ||
1270 | tty_flip_buffer_push(tty); | ||
1271 | } | ||
1272 | tty_insert_flip_char(tty, data[i], tty_flag); | 1270 | tty_insert_flip_char(tty, data[i], tty_flag); |
1273 | } | 1271 | } |
1274 | tty_flip_buffer_push(port->tty); | 1272 | tty_flip_buffer_push(port->tty); |