aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2007-10-18 04:24:20 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-10-25 15:18:41 -0400
commit560aac22e1dce7c7e9756a0a4450ca3bae58fcd5 (patch)
treea0ffe1ab9432939c28760f221a5b6542a5752fc1
parent998e8638711680aecceb9c2ea3b8a09a120d605b (diff)
USB: ir_usb: termios handling
- Clean up paranoia checks - Propogate back a correct fixed termios Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/usb/serial/ir-usb.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/usb/serial/ir-usb.c b/drivers/usb/serial/ir-usb.c
index 5ab6a0c5ac52..6b803ab98543 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
504 504
505 dbg("%s - port %d", __FUNCTION__, port->number); 505 dbg("%s - port %d", __FUNCTION__, port->number);
506 506
507 if ((!port->tty) || (!port->tty->termios)) {
508 dbg("%s - no tty structures", __FUNCTION__);
509 return;
510 }
511
512 baud = tty_get_baud_rate(port->tty); 507 baud = tty_get_baud_rate(port->tty);
513 508
514 /* 509 /*
@@ -531,8 +526,6 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
531 default: 526 default:
532 ir_baud = SPEED_9600; 527 ir_baud = SPEED_9600;
533 baud = 9600; 528 baud = 9600;
534 /* And once the new tty stuff is all done we need to
535 call back to correct the baud bits */
536 } 529 }
537 530
538 if (xbof == -1) 531 if (xbof == -1)
@@ -562,6 +555,10 @@ static void ir_set_termios (struct usb_serial_port *port, struct ktermios *old_t
562 result = usb_submit_urb (port->write_urb, GFP_KERNEL); 555 result = usb_submit_urb (port->write_urb, GFP_KERNEL);
563 if (result) 556 if (result)
564 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result); 557 dev_err(&port->dev, "%s - failed submitting write urb, error %d\n", __FUNCTION__, result);
558
559 /* Only speed changes are supported */
560 tty_termios_copy_hw(port->tty->termios, old_termios);
561 tty_encode_baud_rate(port->tty, baud, baud);
565} 562}
566 563
567 564