diff options
Diffstat (limited to 'drivers/tty/serial/8250/8250_omap.c')
-rw-r--r-- | drivers/tty/serial/8250/8250_omap.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 833771bca0a5..bd40ba402410 100644 --- a/drivers/tty/serial/8250/8250_omap.c +++ b/drivers/tty/serial/8250/8250_omap.c | |||
@@ -1,3 +1,4 @@ | |||
1 | // SPDX-License-Identifier: GPL-2.0 | ||
1 | /* | 2 | /* |
2 | * 8250-core based driver for the OMAP internal UART | 3 | * 8250-core based driver for the OMAP internal UART |
3 | * | 4 | * |
@@ -199,7 +200,7 @@ static void omap_8250_get_divisor(struct uart_port *port, unsigned int baud, | |||
199 | * Old custom speed handling. | 200 | * Old custom speed handling. |
200 | */ | 201 | */ |
201 | if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST) { | 202 | if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST) { |
202 | priv->quot = port->custom_divisor & 0xffff; | 203 | priv->quot = port->custom_divisor & UART_DIV_MAX; |
203 | /* | 204 | /* |
204 | * I assume that nobody is using this. But hey, if somebody | 205 | * I assume that nobody is using this. But hey, if somebody |
205 | * would like to specify the divisor _and_ the mode then the | 206 | * would like to specify the divisor _and_ the mode then the |
@@ -358,7 +359,7 @@ static void omap_8250_set_termios(struct uart_port *port, | |||
358 | * Ask the core to calculate the divisor for us. | 359 | * Ask the core to calculate the divisor for us. |
359 | */ | 360 | */ |
360 | baud = uart_get_baud_rate(port, termios, old, | 361 | baud = uart_get_baud_rate(port, termios, old, |
361 | port->uartclk / 16 / 0xffff, | 362 | port->uartclk / 16 / UART_DIV_MAX, |
362 | port->uartclk / 13); | 363 | port->uartclk / 13); |
363 | omap_8250_get_divisor(port, baud, priv); | 364 | omap_8250_get_divisor(port, baud, priv); |
364 | 365 | ||