Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

clk: ti: clkt_dpll: fix wrong do_div() usage

do_div() is meant to be used with an unsigned dividend.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Tero Kristo <t-kristo@ti.com>

authored by

Nicolas Pitre and committed by
Tero Kristo
df976f5d 8005c49d

+2 -2
+2 -2
drivers/clk/ti/clkt_dpll.c
··· 240 240 */ 241 241 unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk) 242 242 { 243 - long long dpll_clk; 243 + u64 dpll_clk; 244 244 u32 dpll_mult, dpll_div, v; 245 245 struct dpll_data *dd; 246 246 ··· 262 262 dpll_div = v & dd->div1_mask; 263 263 dpll_div >>= __ffs(dd->div1_mask); 264 264 265 - dpll_clk = (long long)clk_get_rate(dd->clk_ref) * dpll_mult; 265 + dpll_clk = (u64)clk_get_rate(dd->clk_ref) * dpll_mult; 266 266 do_div(dpll_clk, dpll_div + 1); 267 267 268 268 return dpll_clk;