From: Maxime Ripard Date: Sat, 21 Jan 2017 22:41:56 +0000 (+0100) Subject: clk: sunxi-ng: mult: Fix minimum in round rate X-Git-Tag: v4.11-rc1~71^2~12^2~15 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c9520be3839063bbb50aabec531cc0d0b8595564;p=platform%2Fkernel%2Flinux-exynos.git clk: sunxi-ng: mult: Fix minimum in round rate The previous code was always taking 1 as the minimum in it's round_rate function, ignoring entirely what was set as minimum in the clock definition. Make sure that's not the case anymore. Fixes: 2beaa601c849 ("clk: sunxi-ng: Implement minimum for multipliers") Acked-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- diff --git a/drivers/clk/sunxi-ng/ccu_mult.c b/drivers/clk/sunxi-ng/ccu_mult.c index 8b7ee7b..a521621 100644 --- a/drivers/clk/sunxi-ng/ccu_mult.c +++ b/drivers/clk/sunxi-ng/ccu_mult.c @@ -40,7 +40,7 @@ static unsigned long ccu_mult_round_rate(struct ccu_mux_internal *mux, struct ccu_mult *cm = data; struct _ccu_mult _cm; - _cm.min = 1; + _cm.min = cm->mult.min; _cm.max = 1 << cm->mult.width; ccu_mult_find_best(parent_rate, rate, &_cm);