Skip to content

Commit

Permalink
Revert "USB: quatech2: only write to the tty if the port is open."
Browse files Browse the repository at this point in the history
This reverts commit 27b351c.

Calling tty_flip_buffer_push on an unopened tty is legal, so the
driver doesn't need track if port has been opened.  Reverting this
allows the entire is_open logic to be removed.

Signed-off-by: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
wfp5p authored and gregkh committed Mar 20, 2013
1 parent cf2d950 commit 29727f3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/usb/serial/quatech2.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,9 +661,7 @@ void qt2_process_read_urb(struct urb *urb)
__func__);
break;
}

if (port_priv->is_open)
tty_flip_buffer_push(&port->port);
tty_flip_buffer_push(&port->port);

newport = *(ch + 3);

Expand Down Expand Up @@ -706,8 +704,7 @@ void qt2_process_read_urb(struct urb *urb)
tty_insert_flip_string(&port->port, ch, 1);
}

if (port_priv->is_open)
tty_flip_buffer_push(&port->port);
tty_flip_buffer_push(&port->port);
}

static void qt2_write_bulk_callback(struct urb *urb)
Expand Down

0 comments on commit 29727f3

Please sign in to comment.