aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/garmin_gps.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/garmin_gps.c')
-rw-r--r--drivers/usb/serial/garmin_gps.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 452efce72714..d6f55e9dccae 100644
--- a/drivers/usb/serial/garmin_gps.c
+++ b/drivers/usb/serial/garmin_gps.c
@@ -275,23 +275,14 @@ static void send_to_tty(struct usb_serial_port *port,
275 char *data, unsigned int actual_length) 275 char *data, unsigned int actual_length)
276{ 276{
277 struct tty_struct *tty = port->tty; 277 struct tty_struct *tty = port->tty;
278 int i;
279 278
280 if (tty && actual_length) { 279 if (tty && actual_length) {
281 280
282 usb_serial_debug_data(debug, &port->dev, 281 usb_serial_debug_data(debug, &port->dev,
283 __FUNCTION__, actual_length, data); 282 __FUNCTION__, actual_length, data);
284 283
285 for (i = 0; i < actual_length ; ++i) { 284 tty_buffer_request_room(tty, actual_length);
286 /* if we insert more than TTY_FLIPBUF_SIZE characters, 285 tty_insert_flip_string(tty, data, actual_length);
287 we drop them. */
288 if(tty->flip.count >= TTY_FLIPBUF_SIZE) {
289 tty_flip_buffer_push(tty);
290 }
291 /* this doesn't actually push the data through unless
292 tty->low_latency is set */
293 tty_insert_flip_char(tty, data[i], 0);
294 }
295 tty_flip_buffer_push(tty); 286 tty_flip_buffer_push(tty);
296 } 287 }
297} 288}