Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=560aac22e1dce7c7e9756a0a4450ca3bae58fcd5
Commit:     560aac22e1dce7c7e9756a0a4450ca3bae58fcd5
Parent:     998e8638711680aecceb9c2ea3b8a09a120d605b
Author:     Alan Cox <[EMAIL PROTECTED]>
AuthorDate: Thu Oct 18 01:24:20 2007 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 12:18:41 2007 -0700

    USB: ir_usb: termios handling
    
    - Clean up paranoia checks
    - Propogate back a correct fixed termios
    
    Signed-off-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/usb/serial/ir-usb.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 5ab6a0c..6b803ab 100644
--- a/drivers/usb/serial/ir-usb.c
+++ b/drivers/usb/serial/ir-usb.c
@@ -504,11 +504,6 @@ static void ir_set_termios (struct usb_serial_port *port, 
struct ktermios *old_t
 
        dbg("%s - port %d", __FUNCTION__, port->number);
 
-       if ((!port->tty) || (!port->tty->termios)) {
-               dbg("%s - no tty structures", __FUNCTION__);
-               return;
-       }
-
        baud = tty_get_baud_rate(port->tty);
 
        /*
@@ -531,8 +526,6 @@ static void ir_set_termios (struct usb_serial_port *port, 
struct ktermios *old_t
                default:
                        ir_baud = SPEED_9600;
                        baud = 9600;
-                       /* And once the new tty stuff is all done we need to
-                          call back to correct the baud bits */
        }
 
        if (xbof == -1)
@@ -562,6 +555,10 @@ static void ir_set_termios (struct usb_serial_port *port, 
struct ktermios *old_t
        result = usb_submit_urb (port->write_urb, GFP_KERNEL);
        if (result)
                dev_err(&port->dev, "%s - failed submitting write urb, error 
%d\n", __FUNCTION__, result);
+
+       /* Only speed changes are supported */
+       tty_termios_copy_hw(port->tty->termios, old_termios);
+       tty_encode_baud_rate(port->tty, baud, baud);
 }
 
 
-
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