From d7be62211125c85fa1dd796e92aadce84961a502 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Wed, 26 Jun 2013 16:47:23 +0200 Subject: 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 Signed-off-by: Greg Kroah-Hartman --- drivers/usb/serial/spcp8x5.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/usb/serial/spcp8x5.c') diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c index ddf6c47137dc..4abac28b5992 100644 --- a/drivers/usb/serial/spcp8x5.c +++ b/drivers/usb/serial/spcp8x5.c @@ -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); } -- cgit v1.2.3