USB: serial: set drain delay at port probe
The port drain delay is constant and should be set at port probe rather than open. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
f5f4530451
commit
d7be622111
@@ -169,6 +169,8 @@ static int spcp8x5_port_probe(struct usb_serial_port *port)
|
||||
|
||||
usb_set_serial_port_data(port, priv);
|
||||
|
||||
port->port.drain_delay = 256;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -411,8 +413,6 @@ static int spcp8x5_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
if (tty)
|
||||
spcp8x5_set_termios(tty, port, NULL);
|
||||
|
||||
port->port.drain_delay = 256;
|
||||
|
||||
return usb_serial_generic_open(tty, port);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user