提交 dcafbb47 编写于 作者: G Geert Uytterhoeven

serial: sh-sci: Drop useless check for zero sampling_rate

sci_port.sampling_rate is always non-zero, except for HSCIF, which uses
sci_baud_calc_hscif() instead of sci_scbrr_calc().
Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 176ae5f6
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册