diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2007-10-18 04:24:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-10-25 15:18:43 -0400 |
commit | 6ce073bd8be0a741440944fed892a136a1d24bbe (patch) | |
tree | ff1bf5c19fd6a70016b2e4570513dac545c83443 /drivers/usb | |
parent | bd5e47ccb656e74a775c002d0308c666bea65a2b (diff) |
USB: io_edgeport: cleanups, and tty speed reporting
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')
-rw-r--r-- | drivers/usb/serial/io_edgeport.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/serial/io_edgeport.c b/drivers/usb/serial/io_edgeport.c index 8dd3abc99d63..a5d2e115e167 100644 --- a/drivers/usb/serial/io_edgeport.c +++ b/drivers/usb/serial/io_edgeport.c | |||
@@ -1503,22 +1503,16 @@ static void edge_unthrottle (struct usb_serial_port *port) | |||
1503 | *****************************************************************************/ | 1503 | *****************************************************************************/ |
1504 | static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old_termios) | 1504 | static void edge_set_termios (struct usb_serial_port *port, struct ktermios *old_termios) |
1505 | { | 1505 | { |
1506 | /* FIXME: This function appears unused ?? */ | ||
1506 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); | 1507 | struct edgeport_port *edge_port = usb_get_serial_port_data(port); |
1507 | struct tty_struct *tty = port->tty; | 1508 | struct tty_struct *tty = port->tty; |
1508 | unsigned int cflag; | 1509 | unsigned int cflag; |
1509 | 1510 | ||
1510 | if (!port->tty || !port->tty->termios) { | ||
1511 | dbg ("%s - no tty or termios", __FUNCTION__); | ||
1512 | return; | ||
1513 | } | ||
1514 | |||
1515 | cflag = tty->termios->c_cflag; | 1511 | cflag = tty->termios->c_cflag; |
1516 | dbg("%s - clfag %08x iflag %08x", __FUNCTION__, | 1512 | dbg("%s - clfag %08x iflag %08x", __FUNCTION__, |
1517 | tty->termios->c_cflag, tty->termios->c_iflag); | 1513 | tty->termios->c_cflag, tty->termios->c_iflag); |
1518 | if (old_termios) { | 1514 | dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__, |
1519 | dbg("%s - old clfag %08x old iflag %08x", __FUNCTION__, | 1515 | old_termios->c_cflag, old_termios->c_iflag); |
1520 | old_termios->c_cflag, old_termios->c_iflag); | ||
1521 | } | ||
1522 | 1516 | ||
1523 | dbg("%s - port %d", __FUNCTION__, port->number); | 1517 | dbg("%s - port %d", __FUNCTION__, port->number); |
1524 | 1518 | ||
@@ -2653,7 +2647,11 @@ static void change_port_settings (struct edgeport_port *edge_port, struct ktermi | |||
2653 | 2647 | ||
2654 | dbg("%s - baud rate = %d", __FUNCTION__, baud); | 2648 | dbg("%s - baud rate = %d", __FUNCTION__, baud); |
2655 | status = send_cmd_write_baud_rate (edge_port, baud); | 2649 | status = send_cmd_write_baud_rate (edge_port, baud); |
2656 | 2650 | if (status == -1) { | |
2651 | /* Speed change was not possible - put back the old speed */ | ||
2652 | baud = tty_termios_baud_rate(old_termios); | ||
2653 | tty_encode_baud_rate(tty, baud, baud); | ||
2654 | } | ||
2657 | return; | 2655 | return; |
2658 | } | 2656 | } |
2659 | 2657 | ||