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:
Johan Hovold
2013-06-26 16:47:23 +02:00
committed by Greg Kroah-Hartman
parent f5f4530451
commit d7be622111
7 changed files with 15 additions and 10 deletions

View File

@@ -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);
}