]> Pileus Git - ~andy/linux/commitdiff
USB: ftdi_sio: clean up device initialisation
authorJohan Hovold <jhovold@gmail.com>
Wed, 26 Jun 2013 14:47:32 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:24:33 +0000 (16:24 -0700)
Do not use zeroed termios data to determine when to unconditionally
configure the device at open.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/ftdi_sio.c

index 7260ec66034715e7a065d0f5fe6441f49a37f6b4..abcaeafa525fc813aa924b5eb03170642ef9e7fe 100644 (file)
@@ -1842,7 +1842,6 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port)
 
 static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
 {
-       struct ktermios dummy;
        struct usb_device *dev = port->serial->dev;
        struct ftdi_private *priv = usb_get_serial_port_data(port);
 
@@ -1858,10 +1857,8 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
           This is same behaviour as serial.c/rs_open() - Kuba */
 
        /* ftdi_set_termios  will send usb control messages */
-       if (tty) {
-               memset(&dummy, 0, sizeof(dummy));
-               ftdi_set_termios(tty, port, &dummy);
-       }
+       if (tty)
+               ftdi_set_termios(tty, port, NULL);
 
        return usb_serial_generic_open(tty, port);
 }