Message ID | 1450119456-964-6-git-send-email-geert+renesas@glider.be (mailing list archive) |
---|---|
State | Accepted |
Delegated to: | Geert Uytterhoeven |
Headers | show |
diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c index cc6fa55231ba3536..dfee7a2f51f147d1 100644 --- a/drivers/tty/serial/sh-sci.c +++ b/drivers/tty/serial/sh-sci.c @@ -1863,13 +1863,7 @@ static void sci_shutdown(struct uart_port *port) static unsigned int sci_scbrr_calc(struct sci_port *s, unsigned int bps, unsigned long freq) { - if (s->sampling_rate) - return DIV_ROUND_CLOSEST(freq, s->sampling_rate * bps) - 1; - - /* Warn, but use a safe default */ - WARN_ON(1); - - return ((freq + 16 * bps) / (32 * bps) - 1); + return DIV_ROUND_CLOSEST(freq, s->sampling_rate * bps) - 1; } /* calculate frame length from SMR */