[PATCH] ir_usb: Termios handling
Alan Cox <[email protected]>
| Newsgroups | gmane.linux.usb.devel |
|---|---|
| Organization | Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903 |
| Message-ID | <[email protected]> |
- Clean up paranoia checks - Propogate back a correct fixed termios Signed-off-by: Alan Cox <[email protected]> diff -u --new-file --exclude-from /usr/src/exclude --recursive linux.vanilla-2.6.23rc8-mm1/drivers/usb/serial/ir-usb.c linux-2.6.23rc8-mm1/drivers/usb/serial/ir-usb.c --- linux.vanilla-2.6.23rc8-mm1/drivers/usb/serial/ir-usb.c 2007-09-26 16:45:23.000000000 +0100 +++ linux-2.6.23rc8-mm1/drivers/usb/serial/ir-usb.c 2007-09-18 16:32:37.000000000 +0100 @@ -504,11 +504,6 @@ 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 @@ 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 @@ 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); } ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ [email protected] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel