aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/pl2303.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 1da57fd9ea23..1103b2f514b7 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -470,16 +470,13 @@ static void pl2303_set_termios(struct usb_serial_port *port,
470 470
471 dbg("%s - port %d", __FUNCTION__, port->number); 471 dbg("%s - port %d", __FUNCTION__, port->number);
472 472
473 if ((!port->tty) || (!port->tty->termios)) {
474 dbg("%s - no tty structures", __FUNCTION__);
475 return;
476 }
477
478 spin_lock_irqsave(&priv->lock, flags); 473 spin_lock_irqsave(&priv->lock, flags);
479 if (!priv->termios_initialized) { 474 if (!priv->termios_initialized) {
480 *(port->tty->termios) = tty_std_termios; 475 *(port->tty->termios) = tty_std_termios;
481 port->tty->termios->c_cflag = B9600 | CS8 | CREAD | 476 port->tty->termios->c_cflag = B9600 | CS8 | CREAD |
482 HUPCL | CLOCAL; 477 HUPCL | CLOCAL;
478 port->tty->termios->c_ispeed = 9600;
479 port->tty->termios->c_ospeed = 9600;
483 priv->termios_initialized = 1; 480 priv->termios_initialized = 1;
484 } 481 }
485 spin_unlock_irqrestore(&priv->lock, flags); 482 spin_unlock_irqrestore(&priv->lock, flags);
@@ -596,6 +593,10 @@ static void pl2303_set_termios(struct usb_serial_port *port,
596 dbg ("0x40:0x1:0x0:0x0 %d", i); 593 dbg ("0x40:0x1:0x0:0x0 %d", i);
597 } 594 }
598 595
596 /* FIXME: Need to read back resulting baud rate */
597 if (baud)
598 tty_encode_baud_rate(port->tty, baud, baud);
599
599 kfree(buf); 600 kfree(buf);
600} 601}
601 602