Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=df64c47184aedf34fd2a69a4b7f68584fe982fdf
Commit:     df64c47184aedf34fd2a69a4b7f68584fe982fdf
Parent:     3d3ddce568b79911bc893b9e8542f7e1d3bc72c7
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 20:54:47 2007 +0100
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 12:18:44 2007 -0700

    USB: pl2303: remove can't happen checks, set speed properly and report baud 
rate
    
    Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/pl2303.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 1da57fd..1103b2f 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,
 
        dbg("%s -  port %d", __FUNCTION__, port->number);
 
-       if ((!port->tty) || (!port->tty->termios)) {
-               dbg("%s - no tty structures", __FUNCTION__);
-               return;
-       }
-
        spin_lock_irqsave(&priv->lock, flags);
        if (!priv->termios_initialized) {
                *(port->tty->termios) = tty_std_termios;
                port->tty->termios->c_cflag = B9600 | CS8 | CREAD |
                                              HUPCL | CLOCAL;
+               port->tty->termios->c_ispeed = 9600;
+               port->tty->termios->c_ospeed = 9600;
                priv->termios_initialized = 1;
        }
        spin_unlock_irqrestore(&priv->lock, flags);
@@ -596,6 +593,10 @@ static void pl2303_set_termios(struct usb_serial_port 
*port,
                dbg ("0x40:0x1:0x0:0x0  %d", i);
        }
 
+       /* FIXME: Need to read back resulting baud rate */
+       if (baud)
+               tty_encode_baud_rate(port->tty, baud, baud);
+
        kfree(buf);
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to