serial: sh-sci: Updated calculation of bit error rate and bit rate
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Mon, 14 Jul 2014 07:09:58 +0000 (16:09 +0900)
committerSimon Horman <horms@verge.net.au>
Fri, 5 Dec 2014 00:24:20 +0000 (09:24 +0900)
commit1d86aace498324e093278a1cda898b531d63804e
tree05c955f6abe9f74ec587b17bdda273c1d5478960
parent89b02205aa89599743c268582bc0f8d0f28f3116
serial: sh-sci: Updated calculation of bit error rate and bit rate

Currently, the decimal point is discarded calculation of BRR.
Therefore, it can not calculate a value close to the correct value.
This patch fixes this problem by using DIV_ROUND_CLOSEST.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit b7d66397f4d282ddf2a2fe516fc9329c5a063459)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
drivers/tty/serial/sh-sci.c