From: Boris Brezillon Date: Fri, 14 Nov 2014 18:54:49 +0000 (+0100) Subject: clk: at91: usb: fix at91rm9200 round and set rate X-Git-Tag: omap-for-v3.19/fixes-for-merge-window~73^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ff553ea1a3d5b903becda790eeb6bd3debf239f9;p=pandora-kernel.git clk: at91: usb: fix at91rm9200 round and set rate at91rm9200_clk_usb_set_rate might fail depending on the requested rate, because the parent_rate / rate remainder is not necessarily zero. Moreover, when rounding down the calculated rate we might alter the divisor calculation and end up with an invalid divisor. To solve those problems, accept a non zero remainder, and always round division to the closest result. Signed-off-by: Boris Brezillon Reported-by: Andreas Henriksson Tested-by: Andreas Henriksson Acked-by: Nicolas Ferre Signed-off-by: Michael Turquette --- Reading git-diff-tree failed