Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 97d24634 authored by Uwe Kleine-König's avatar Uwe Kleine-König Committed by Greg Kroah-Hartman
Browse files

serial: use DIV_ROUND_CLOSEST instead of open coding it

parent 1e9deb11
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
}