[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091121134015.16090.21264.stgit@srv002.fuzzey.net>
Date: Sat, 21 Nov 2009 14:40:15 +0100
From: Martin Fuzzey <mfuzzey@...il.com>
To: tsbogend@...ha.franken.de, linux-serial@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Subject: [RFC PATCH 6/9] Serial: sc26xx simplify timeout calculation
We already have the baud rate - no need to calculate it again.
Signed-off-by: Martin Fuzzey <mfuzzey@...il.com>
---
drivers/serial/sc26xx.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/drivers/serial/sc26xx.c b/drivers/serial/sc26xx.c
index 1b47443..316d110 100644
--- a/drivers/serial/sc26xx.c
+++ b/drivers/serial/sc26xx.c
@@ -401,7 +401,6 @@ static void sc26xx_set_termios(struct uart_port *port, struct ktermios *termios,
struct ktermios *old)
{
unsigned int baud = uart_get_baud_rate(port, termios, old, 0, 4000000);
- unsigned int quot = uart_get_divisor(port, baud);
unsigned int iflag, cflag;
unsigned long flags;
u8 mr1, mr2, csr;
@@ -505,9 +504,7 @@ static void sc26xx_set_termios(struct uart_port *port, struct ktermios *termios,
while ((READ_SC_PORT(port, SR) & ((1 << 3) | (1 << 2))) != 0xc)
udelay(2);
- /* XXX */
- uart_update_timeout(port, cflag,
- (port->uartclk / (16 * quot)));
+ uart_update_timeout(port, cflag, baud);
spin_unlock_irqrestore(&port->lock, flags);
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists