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.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/usb/serial/garmin_gps.c b/drivers/usb/serial/garmin_gps.c
index 35820bda7ae19..d6f55e9dccae2 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);
}
}