]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/serial/oti6858.c
tty: usb-serial krefs
[linux-2.6-omap-h63xx.git] / drivers / usb / serial / oti6858.c
index 42f92815c6e5dd238a89b02b9a6508633eda4680..ba551f00f16ff1ec30fbcd90422f1e1112e8c00a 100644 (file)
@@ -998,11 +998,12 @@ static void oti6858_read_bulk_callback(struct urb *urb)
                return;
        }
 
-       tty = port->port.tty;
+       tty = tty_port_tty_get(&port->port);
        if (tty != NULL && urb->actual_length > 0) {
                tty_insert_flip_string(tty, data, urb->actual_length);
                tty_flip_buffer_push(tty);
        }
+       tty_kref_put(tty);
 
        /* schedule the interrupt urb if we are still open */
        if (port->port.count != 0) {