summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNicolas Pitre <nicolas.pitre@linaro.org>2015-11-04 05:09:58 +0100
committerTero Kristo <t-kristo@ti.com>2015-11-24 10:30:27 +0100
commitdf976f5d95028e26b4c967b24518fe340f8a726d (patch)
tree0b5cf225860a141311986d2bda1957e27ec415b0 /drivers
parentLinux 4.4-rc1 (diff)
downloadlinux-df976f5d95028e26b4c967b24518fe340f8a726d.tar.xz
linux-df976f5d95028e26b4c967b24518fe340f8a726d.zip
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/clk/ti/clkt_dpll.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/clk/ti/clkt_dpll.c b/drivers/clk/ti/clkt_dpll.c
index 9023ca9caf84..b5cc6f66ae5d 100644
--- 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;