projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ed9c82
)
ti/clkt_dpll: fix wrong do_div() usage
author
Nicolas Pitre
<nicolas.pitre@linaro.org>
Wed, 4 Nov 2015 04:09:58 +0000
(23:09 -0500)
committer
Nicolas Pitre
<nicolas.pitre@linaro.org>
Mon, 16 Nov 2015 17:37:55 +0000
(12:37 -0500)
do_div() is meant to be used with an unsigned dividend.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
drivers/clk/ti/clkt_dpll.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/clk/ti/clkt_dpll.c
b/drivers/clk/ti/clkt_dpll.c
index 9023ca9caf84dde6b02c7ffacdded5244b16795d..b5cc6f66ae5df5e1725dc21ebfd3b18ca5eac1fa 100644
(file)
--- a/
drivers/clk/ti/clkt_dpll.c
+++ b/
drivers/clk/ti/clkt_dpll.c
@@
-240,7
+240,7
@@
u8 omap2_init_dpll_parent(struct clk_hw *hw)
*/
unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
{
-
long long
dpll_clk;
+
u64
dpll_clk;
u32 dpll_mult, dpll_div, v;
struct dpll_data *dd;
@@
-262,7
+262,7
@@
unsigned long omap2_get_dpll_rate(struct clk_hw_omap *clk)
dpll_div = v & dd->div1_mask;
dpll_div >>= __ffs(dd->div1_mask);
- dpll_clk = (
long long
)clk_get_rate(dd->clk_ref) * dpll_mult;
+ dpll_clk = (
u64
)clk_get_rate(dd->clk_ref) * dpll_mult;
do_div(dpll_clk, dpll_div + 1);
return dpll_clk;