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.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c
index 3ddd7a1f7ff3..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;
@@ -774,12 +773,8 @@ static void mos7840_bulk_in_callback(struct urb *urb)
774 773
775 if (urb->actual_length) { 774 if (urb->actual_length) {
776 struct tty_port *tport = &mos7840_port->port->port; 775 struct tty_port *tport = &mos7840_port->port->port;
777 tty = tty_port_tty_get(tport); 776 tty_insert_flip_string(tport, data, urb->actual_length);
778 if (tty) { 777 tty_flip_buffer_push(tport);
779 tty_insert_flip_string(tport, data, urb->actual_length);
780 tty_flip_buffer_push(tty);
781 tty_kref_put(tty);
782 }
783 mos7840_port->icount.rx += urb->actual_length; 778 mos7840_port->icount.rx += urb->actual_length;
784 smp_wmb(); 779 smp_wmb();
785 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);