From: Boris Brezillon Date: Mon, 17 Nov 2014 13:16:56 +0000 (+0100) Subject: clk: at91: usb: fix at91sam9x5 recalc, round and set rate X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~73^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69daf75aafc8410ef046c70be65c71f2dd4e08f9;p=pandora-kernel.git 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 Acked-by: Nicolas Ferre Signed-off-by: Michael Turquette --- Reading git-diff-tree failed