X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fserial%2Fgarmin_gps.c;h=d6f55e9dccae26433fc066273c1a0858943c27fb;hb=33cbd30eaf24ea43af4fe161b6fb34a859b3f2e0;hp=35820bda7ae19bfe56b1d33528558f653cafde82;hpb=b0c4e148bd591629749d02a8fbc8d81c26d548cf;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c index 35820bda7ae..d6f55e9dcca 100644 --- a/drivers/usb/serial/garmin_gps.c +++ b/drivers/usb/serial/garmin_gps.c @@ -222,11 +222,11 @@ static struct usb_device_id id_table [] = { MODULE_DEVICE_TABLE (usb, id_table); static struct usb_driver garmin_driver = { - .owner = THIS_MODULE, .name = "garmin_gps", .probe = usb_serial_probe, .disconnect = usb_serial_disconnect, .id_table = id_table, + .no_dynamic_id = 1, }; @@ -275,23 +275,14 @@ static void send_to_tty(struct usb_serial_port *port, char *data, unsigned int actual_length) { struct tty_struct *tty = port->tty; - int i; if (tty && actual_length) { usb_serial_debug_data(debug, &port->dev, __FUNCTION__, actual_length, data); - for (i = 0; i < actual_length ; ++i) { - /* if we insert more than TTY_FLIPBUF_SIZE characters, - we drop them. */ - if(tty->flip.count >= TTY_FLIPBUF_SIZE) { - tty_flip_buffer_push(tty); - } - /* this doesn't actually push the data through unless - tty->low_latency is set */ - tty_insert_flip_char(tty, data[i], 0); - } + tty_buffer_request_room(tty, actual_length); + tty_insert_flip_string(tty, data, actual_length); tty_flip_buffer_push(tty); } }