diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2014-11-17 14:16:56 +0100 |
---|---|---|
committer | Michael Turquette <mturquette@linaro.org> | 2014-11-17 19:38:40 +0100 |
commit | 69daf75aafc8410ef046c70be65c71f2dd4e08f9 (patch) | |
tree | be9397ee4a44717bcd8648816ddeff31284ef83c /include | |
parent | clk: at91: usb: fix at91rm9200 round and set rate (diff) | |
download | linux-69daf75aafc8410ef046c70be65c71f2dd4e08f9.tar.xz linux-69daf75aafc8410ef046c70be65c71f2dd4e08f9.zip |
clk: at91: usb: fix at91sam9x5 recalc, round and set rate
First check for rate == 0 in set_rate and round_rate to avoid div by zero.
Then, in order to get the closest rate, round all divisions to the closest
result instead of rounding them down.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Michael Turquette <mturquette@linaro.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions