Skip to content

Commit 196145c

Browse files
committed
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux
Pull clk fix from Stephen Boyd: "One build fix for 32-bit arches using the Qualcomm PLL driver. It's cheaper to use a comparison here instead of a division so we just do that to fix the build" * tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: clk: qcom: clk-alpha-pll: Simplify the zonda_pll_adjust_l_val()
2 parents b8e7cd0 + a4d89b1 commit 196145c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/clk/qcom/clk-alpha-pll.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2124,10 +2124,8 @@ static void zonda_pll_adjust_l_val(unsigned long rate, unsigned long prate, u32
21242124

21252125
quotient = rate;
21262126
remainder = do_div(quotient, prate);
2127-
*l = quotient;
21282127

2129-
if ((remainder * 2) / prate)
2130-
*l = *l + 1;
2128+
*l = rate + (u32)(remainder * 2 >= prate);
21312129
}
21322130

21332131
static int clk_zonda_pll_set_rate(struct clk_hw *hw, unsigned long rate,

0 commit comments

Comments
 (0)