aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/iuu_phoenix.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/iuu_phoenix.c')
-rw-r--r--drivers/usb/serial/iuu_phoenix.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/serial/iuu_phoenix.c b/drivers/usb/serial/iuu_phoenix.c
index 1e1fbed65ef2..ff77027160aa 100644
--- a/drivers/usb/serial/iuu_phoenix.c
+++ b/drivers/usb/serial/iuu_phoenix.c
@@ -581,7 +581,6 @@ static void read_buf_callback(struct urb *urb)
581{ 581{
582 struct usb_serial_port *port = urb->context; 582 struct usb_serial_port *port = urb->context;
583 unsigned char *data = urb->transfer_buffer; 583 unsigned char *data = urb->transfer_buffer;
584 struct tty_struct *tty;
585 int status = urb->status; 584 int status = urb->status;
586 585
587 if (status) { 586 if (status) {
@@ -592,14 +591,12 @@ static void read_buf_callback(struct urb *urb)
592 } 591 }
593 592
594 dev_dbg(&port->dev, "%s - %i chars to write\n", __func__, urb->actual_length); 593 dev_dbg(&port->dev, "%s - %i chars to write\n", __func__, urb->actual_length);
595 tty = tty_port_tty_get(&port->port);
596 if (data == NULL) 594 if (data == NULL)
597 dev_dbg(&port->dev, "%s - data is NULL !!!\n", __func__); 595 dev_dbg(&port->dev, "%s - data is NULL !!!\n", __func__);
598 if (tty && urb->actual_length && data) { 596 if (urb->actual_length && data) {
599 tty_insert_flip_string(tty, data, urb->actual_length); 597 tty_insert_flip_string(&port->port, data, urb->actual_length);
600 tty_flip_buffer_push(tty); 598 tty_flip_buffer_push(&port->port);
601 } 599 }
602 tty_kref_put(tty);
603 iuu_led_activity_on(urb); 600 iuu_led_activity_on(urb);
604} 601}
605 602