aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2007-07-09 15:03:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-12 19:34:41 -0400
commite0c79f512cf469bc11fe9d53a4dcc5d0c39a3b79 (patch)
tree1f636db22152d33fe2b97c547bbb6081db11cec9 /drivers/usb/serial
parent31473aae5afb11f0c5217dafdbc9df8a470071aa (diff)
USB: pl2303: remove bogus checks and fix speed support to use tty_get_baud_rate()
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>
Diffstat (limited to 'drivers/usb/serial')
-rw-r--r--drivers/usb/serial/pl2303.c33
1 files changed, 1 insertions, 32 deletions
diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
index 4348c1feab4e..f9f85f56f0db 100644
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -484,15 +484,6 @@ static void pl2303_set_termios(struct usb_serial_port *port,
484 spin_unlock_irqrestore(&priv->lock, flags); 484 spin_unlock_irqrestore(&priv->lock, flags);
485 485
486 cflag = port->tty->termios->c_cflag; 486 cflag = port->tty->termios->c_cflag;
487 /* check that they really want us to change something */
488 if (old_termios) {
489 if ((cflag == old_termios->c_cflag) &&
490 (RELEVANT_IFLAG(port->tty->termios->c_iflag) ==
491 RELEVANT_IFLAG(old_termios->c_iflag))) {
492 dbg("%s - nothing to change...", __FUNCTION__);
493 return;
494 }
495 }
496 487
497 buf = kzalloc(7, GFP_KERNEL); 488 buf = kzalloc(7, GFP_KERNEL);
498 if (!buf) { 489 if (!buf) {
@@ -517,29 +508,7 @@ static void pl2303_set_termios(struct usb_serial_port *port,
517 dbg("%s - data bits = %d", __FUNCTION__, buf[6]); 508 dbg("%s - data bits = %d", __FUNCTION__, buf[6]);
518 } 509 }
519 510
520 baud = 0; 511 baud = tty_get_baud_rate(port->tty);;
521 switch (cflag & CBAUD) {
522 case B0: baud = 0; break;
523 case B75: baud = 75; break;
524 case B150: baud = 150; break;
525 case B300: baud = 300; break;
526 case B600: baud = 600; break;
527 case B1200: baud = 1200; break;
528 case B1800: baud = 1800; break;
529 case B2400: baud = 2400; break;
530 case B4800: baud = 4800; break;
531 case B9600: baud = 9600; break;
532 case B19200: baud = 19200; break;
533 case B38400: baud = 38400; break;
534 case B57600: baud = 57600; break;
535 case B115200: baud = 115200; break;
536 case B230400: baud = 230400; break;
537 case B460800: baud = 460800; break;
538 default:
539 dev_err(&port->dev, "pl2303 driver does not support"
540 " the baudrate requested (fix it)\n");
541 break;
542 }
543 dbg("%s - baud = %d", __FUNCTION__, baud); 512 dbg("%s - baud = %d", __FUNCTION__, baud);
544 if (baud) { 513 if (baud) {
545 buf[0] = baud & 0xff; 514 buf[0] = baud & 0xff;