mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
serial: use DIV_ROUND_CLOSEST instead of open coding it
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
1e9deb118e
commit
97d24634da
1 changed files with 1 additions and 1 deletions
|
@ -421,7 +421,7 @@ uart_get_divisor(struct uart_port *port, unsigned int baud)
|
|||
if (baud == 38400 && (port->flags & UPF_SPD_MASK) == UPF_SPD_CUST)
|
||||
quot = port->custom_divisor;
|
||||
else
|
||||
quot = (port->uartclk + (8 * baud)) / (16 * baud);
|
||||
quot = DIV_ROUND_CLOSEST(port->uartclk, 16 * baud);
|
||||
|
||||
return quot;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue