Merge tag 'pm+acpi-3.19-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafae...
[cascardo/linux.git] / drivers / tty / serial / 8250 / 8250_mtk.c
index de7aae5..7a11fac 100644 (file)
@@ -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);
        }
 
        /*
@@ -244,7 +244,7 @@ static int mtk8250_resume(struct device *dev)
 }
 #endif /* CONFIG_PM_SLEEP */
 
-#ifdef CONFIG_PM_RUNTIME
+#ifdef CONFIG_PM
 static int mtk8250_runtime_suspend(struct device *dev)
 {
        struct mtk8250_data *data = dev_get_drvdata(dev);