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)
committerStephane Desneux <stephane.desneux@open.eurogiciel.org>
Wed, 4 Feb 2015 10:15:32 +0000 (11:15 +0100)
commitce2e1058ad485ab9d10cd93524b5de4870db10c0
treea5a641ab7671ffdfd067fe5c2b4430722ea0f43e
parent049b20b9a56e9d8a1b5a1a0a0e8c78139eb5e5b9
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