diff options
Diffstat (limited to 'drivers/tty/serial/8250/8250_mtk.c')
-rw-r--r-- | drivers/tty/serial/8250/8250_mtk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index de7aae523b37..6f93123a428a 100644 --- a/drivers/tty/serial/8250/8250_mtk.c +++ b/drivers/tty/serial/8250/8250_mtk.c @@ -74,14 +74,14 @@ mtk8250_set_termios(struct uart_port *port, struct ktermios *termios, /* Set to next lower baudrate supported */ if ((baud == 500000) || (baud == 576000)) baud = 460800; - quot = DIV_ROUND_CLOSEST(port->uartclk, 4 * baud); + quot = DIV_ROUND_UP(port->uartclk, 4 * baud); } else { serial_port_out(port, UART_MTK_HIGHS, 0x3); /* Set to highest baudrate supported */ if (baud >= 1152000) baud = 921600; - quot = (port->uartclk / (256 * baud)) + 1; + quot = DIV_ROUND_UP(port->uartclk, 256 * baud); } /* |