Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 28311
b: refs/heads/master
c: 57845bd
h: refs/heads/master
i:
  28309: c640f18
  28307: f9a5e70
  28303: 09c79d3
v: v3
  • Loading branch information
Guennadi Liakhovetski authored and Greg Kroah-Hartman committed Jun 21, 2006
1 parent 8e17f2a commit 9e0d977
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c10746dbb39d41e5fc27badfebe61448210c426d
refs/heads/master: 57845bd104233cb75b9ab3624f7ea7662298bc27
10 changes: 5 additions & 5 deletions trunk/drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1261,7 +1261,6 @@ static void ftdi_shutdown (struct usb_serial *serial)

static int ftdi_open (struct usb_serial_port *port, struct file *filp)
{ /* ftdi_open */
struct termios tmp_termios;
struct usb_device *dev = port->serial->dev;
struct ftdi_private *priv = usb_get_serial_port_data(port);
unsigned long flags;
Expand All @@ -1271,8 +1270,8 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp)

dbg("%s", __FUNCTION__);


port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;
if (port->tty)
port->tty->low_latency = (priv->flags & ASYNC_LOW_LATENCY) ? 1 : 0;

/* No error checking for this (will get errors later anyway) */
/* See ftdi_sio.h for description of what is reset */
Expand All @@ -1286,7 +1285,8 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp)
This is same behaviour as serial.c/rs_open() - Kuba */

/* ftdi_set_termios will send usb control messages */
ftdi_set_termios(port, &tmp_termios);
if (port->tty)
ftdi_set_termios(port, NULL);

/* FIXME: Flow control might be enabled, so it should be checked -
we have no control of defaults! */
Expand Down Expand Up @@ -1867,7 +1867,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct termios *old_
err("%s urb failed to set baudrate", __FUNCTION__);
}
/* Ensure RTS and DTR are raised when baudrate changed from 0 */
if ((old_termios->c_cflag & CBAUD) == B0) {
if (!old_termios || (old_termios->c_cflag & CBAUD) == B0) {
set_mctrl(port, TIOCM_DTR | TIOCM_RTS);
}
}
Expand Down

0 comments on commit 9e0d977

Please sign in to comment.