]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/usb/serial/omninet.c
TTY: switch tty_flip_buffer_push
[karo-tx-linux.git] / drivers / usb / serial / omninet.c
index 7818af931a48fcbb1c5ed77e77dd26b438137c8a..1e1cafe287e4e63f7b7c23a18fd9b66965228e2e 100644 (file)
@@ -174,13 +174,9 @@ static void omninet_read_bulk_callback(struct urb *urb)
        }
 
        if (urb->actual_length && header->oh_len) {
-               struct tty_struct *tty = tty_port_tty_get(&port->port);
-               if (tty) {
-                       tty_insert_flip_string(tty, data + OMNINET_DATAOFFSET,
-                                                       header->oh_len);
-                       tty_flip_buffer_push(tty);
-                       tty_kref_put(tty);
-               }
+               tty_insert_flip_string(&port->port, data + OMNINET_DATAOFFSET,
+                               header->oh_len);
+               tty_flip_buffer_push(&port->port);
        }
 
        /* Continue trying to always read  */