]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/serial/kobil_sct.c
tty: usb-serial krefs
[linux-2.6-omap-h63xx.git] / drivers / usb / serial / kobil_sct.c
index deba28ec77e8e43cab07691bf17ed68624b9d517..cfcf37c2b95703014f39436539619192a11864cc 100644 (file)
@@ -383,7 +383,7 @@ static void kobil_read_int_callback(struct urb *urb)
                return;
        }
 
-       tty = port->port.tty;
+       tty = tty_port_tty_get(&port->port);
        if (urb->actual_length) {
 
                /* BEGIN DEBUG */
@@ -405,6 +405,7 @@ static void kobil_read_int_callback(struct urb *urb)
                tty_insert_flip_string(tty, data, urb->actual_length);
                tty_flip_buffer_push(tty);
        }
+       tty_kref_put(tty);
        /* someone sets the dev to 0 if the close method has been called */
        port->interrupt_in_urb->dev = port->serial->dev;