]> git.karo-electronics.de Git - linux-beck.git/commitdiff
serial: sh-sci: fix condition test to set SCBRR
authorTakashi Yoshii <takashi.yoshii.zj@renesas.com>
Fri, 16 Nov 2012 01:52:22 +0000 (10:52 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Nov 2012 02:02:37 +0000 (18:02 -0800)
SCBRR == 0 is valid value (divide by 1).

Signed-off-by: Takashi Yoshii <takashi.yoshii.zj@renesas.com>
Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/sh-sci.c

index 8aade611d1a88920db80a836f428b5ca8f0942c7..6c1fddb0e20a32605bbbc500725da507d1c4c80d 100644 (file)
@@ -1854,7 +1854,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
        dev_dbg(port->dev, "%s: SMR %x, t %x, SCSCR %x\n", __func__, smr_val, t,
                s->cfg->scscr);
 
-       if (t > 0) {
+       if (t >= 0) {
                if (t >= 256) {
                        serial_port_out(port, SCSMR, (serial_port_in(port, SCSMR) & ~3) | 1);
                        t >>= 2;