diff options
Diffstat (limited to 'drivers/usb/serial/ir-usb.c')
-rw-r--r-- | 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 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 | ||