aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/omninet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/omninet.c')
-rw-r--r--drivers/usb/serial/omninet.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/usb/serial/omninet.c b/drivers/usb/serial/omninet.c
index ae8e227f3db2..c4d70b0f1e48 100644
--- a/drivers/usb/serial/omninet.c
+++ b/drivers/usb/serial/omninet.c
@@ -172,7 +172,7 @@ static int omninet_open(struct tty_struct *tty,
172 dbg("%s - port %d", __func__, port->number); 172 dbg("%s - port %d", __func__, port->number);
173 173
174 wport = serial->port[1]; 174 wport = serial->port[1];
175 wport->port.tty = tty; /* FIXME */ 175 tty_port_tty_set(&wport->port, tty);
176 176
177 /* Start reading from the device */ 177 /* Start reading from the device */
178 usb_fill_bulk_urb(port->read_urb, serial->dev, 178 usb_fill_bulk_urb(port->read_urb, serial->dev,
@@ -229,9 +229,11 @@ static void omninet_read_bulk_callback(struct urb *urb)
229 } 229 }
230 230
231 if (urb->actual_length && header->oh_len) { 231 if (urb->actual_length && header->oh_len) {
232 tty_insert_flip_string(port->port.tty, 232 struct tty_struct *tty = tty_port_tty_get(&port->port);
233 data + OMNINET_DATAOFFSET, header->oh_len); 233 tty_insert_flip_string(tty, data + OMNINET_DATAOFFSET,
234 tty_flip_buffer_push(port->port.tty); 234 header->oh_len);
235 tty_flip_buffer_push(tty);
236 tty_kref_put(tty);
235 } 237 }
236 238
237 /* Continue trying to always read */ 239 /* Continue trying to always read */