]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/serial/empeg.c
tty: usb-serial krefs
[linux-2.6-omap-h63xx.git] / drivers / usb / serial / empeg.c
index a6ab5b58d9ca5c6456a9a56eb7606e4fb18c4b0e..1072e847280fd88df4a5fc1f9770d5a36a051692 100644 (file)
@@ -33,9 +33,8 @@
  *     Moved MOD_DEC_USE_COUNT to end of empeg_close().
  *
  * (12/03/2000) gb
- *     Added port->port.tty->ldisc.set_termios(port->port.tty, NULL) to
- *     empeg_open(). This notifies the tty driver that the termios have
- *     changed.
+ *     Added tty->ldisc.set_termios(port, tty, NULL) to empeg_open().
+ *     This notifies the tty driver that the termios have changed.
  *
  * (11/13/2000) gb
  *     Moved tty->low_latency = 1 from empeg_read_bulk_callback() to
@@ -354,7 +353,7 @@ static void empeg_read_bulk_callback(struct urb *urb)
 
        usb_serial_debug_data(debug, &port->dev, __func__,
                                                urb->actual_length, data);
-       tty = port->port.tty;
+       tty = tty_port_tty_get(&port->port);
 
        if (urb->actual_length) {
                tty_buffer_request_room(tty, urb->actual_length);
@@ -362,6 +361,7 @@ static void empeg_read_bulk_callback(struct urb *urb)
                tty_flip_buffer_push(tty);
                bytes_in += urb->actual_length;
        }
+       tty_kref_put(tty);
 
        /* Continue trying to always read  */
        usb_fill_bulk_urb(