aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/mos7840.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/mos7840.c')
-rw-r--r--drivers/usb/serial/mos7840.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 66d9e088d9d9..809fb329eca5 100644
--- a/drivers/usb/serial/mos7840.c
+++ b/drivers/usb/serial/mos7840.c
@@ -744,7 +744,6 @@ static void mos7840_bulk_in_callback(struct urb *urb)
744 struct usb_serial *serial; 744 struct usb_serial *serial;
745 struct usb_serial_port *port; 745 struct usb_serial_port *port;
746 struct moschip_port *mos7840_port; 746 struct moschip_port *mos7840_port;
747 struct tty_struct *tty;
748 int status = urb->status; 747 int status = urb->status;
749 748
750 mos7840_port = urb->context; 749 mos7840_port = urb->context;
@@ -773,12 +772,9 @@ static void mos7840_bulk_in_callback(struct urb *urb)
773 usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data); 772 usb_serial_debug_data(&port->dev, __func__, urb->actual_length, data);
774 773
775 if (urb->actual_length) { 774 if (urb->actual_length) {
776 tty = tty_port_tty_get(&mos7840_port->port->port); 775 struct tty_port *tport = &mos7840_port->port->port;
777 if (tty) { 776 tty_insert_flip_string(tport, data, urb->actual_length);
778 tty_insert_flip_string(tty, data, urb->actual_length); 777 tty_flip_buffer_push(tport);
779 tty_flip_buffer_push(tty);
780 tty_kref_put(tty);
781 }
782 mos7840_port->icount.rx += urb->actual_length; 778 mos7840_port->icount.rx += urb->actual_length;
783 smp_wmb(); 779 smp_wmb();
784 dev_dbg(&port->dev, "mos7840_port->icount.rx is %d:\n", mos7840_port->icount.rx); 780 dev_dbg(&port->dev, "mos7840_port->icount.rx is %d:\n", mos7840_port->icount.rx);