Skip to content

Commit

Permalink
serial: sh-sci: fix condition test to set SCBRR
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Takashi Yoshii authored and Greg Kroah-Hartman committed Nov 16, 2012
1 parent 0174e5c commit 4ffc3cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/sh-sci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4ffc3cd

Please sign in to comment.