提交 be0278cc 编写于 作者: J Johan Hovold 提交者: Greg Kroah-Hartman

USB: ftdi_sio: clean up device initialisation

Do not use zeroed termios data to determine when to unconditionally
configure the device at open.
Signed-off-by: NJohan Hovold <jhovold@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 dc43ff92
...@@ -1842,7 +1842,6 @@ static int ftdi_sio_port_remove(struct usb_serial_port *port) ...@@ -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) static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
{ {
struct ktermios dummy;
struct usb_device *dev = port->serial->dev; struct usb_device *dev = port->serial->dev;
struct ftdi_private *priv = usb_get_serial_port_data(port); 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) ...@@ -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 */ This is same behaviour as serial.c/rs_open() - Kuba */
/* ftdi_set_termios will send usb control messages */ /* ftdi_set_termios will send usb control messages */
if (tty) { if (tty)
memset(&dummy, 0, sizeof(dummy)); ftdi_set_termios(tty, port, NULL);
ftdi_set_termios(tty, port, &dummy);
}
return usb_serial_generic_open(tty, port); return usb_serial_generic_open(tty, port);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册