diff options
Diffstat (limited to 'drivers/clk/clk-fixed-factor.c')
-rw-r--r-- | drivers/clk/clk-fixed-factor.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c index a4899855c0f6..1ef271e47594 100644 --- a/drivers/clk/clk-fixed-factor.c +++ b/drivers/clk/clk-fixed-factor.c | |||
@@ -28,8 +28,11 @@ static unsigned long clk_factor_recalc_rate(struct clk_hw *hw, | |||
28 | unsigned long parent_rate) | 28 | unsigned long parent_rate) |
29 | { | 29 | { |
30 | struct clk_fixed_factor *fix = to_clk_fixed_factor(hw); | 30 | struct clk_fixed_factor *fix = to_clk_fixed_factor(hw); |
31 | unsigned long long int rate; | ||
31 | 32 | ||
32 | return parent_rate * fix->mult / fix->div; | 33 | rate = (unsigned long long int)parent_rate * fix->mult; |
34 | do_div(rate, fix->div); | ||
35 | return (unsigned long)rate; | ||
33 | } | 36 | } |
34 | 37 | ||
35 | static long clk_factor_round_rate(struct clk_hw *hw, unsigned long rate, | 38 | static long clk_factor_round_rate(struct clk_hw *hw, unsigned long rate, |