lkml.org 
[lkml]   [2009]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[RFC PATCH 6/9] Serial: sc26xx simplify timeout calculation
    Date
    We already have the baud rate - no need to calculate it again.

    Signed-off-by: Martin Fuzzey <mfuzzey@gmail.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);
    }


    \
     
     \ /
      Last update: 2009-11-21 14:45    [W:0.022 / U:89.264 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site