diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-12 16:32:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-12 16:32:32 -0700 |
commit | 196145c606d0f816fd3926483cb1ff87e09c2c0b (patch) | |
tree | df60b1cda66bf97340182db707db915336962c98 /drivers | |
parent | b8e7cd09ae543c1d384677b3d43e009a0e8647ca (diff) | |
parent | a4d89b11aca3ffa73e234f06685261ce85e5fb41 (diff) |
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()
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/clk/qcom/clk-alpha-pll.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/clk/qcom/clk-alpha-pll.c b/drivers/clk/qcom/clk-alpha-pll.c index ad9a84d521fc..31bf9d13f154 100644 --- a/drivers/clk/qcom/clk-alpha-pll.c +++ b/drivers/clk/qcom/clk-alpha-pll.c @@ -2124,10 +2124,8 @@ static void zonda_pll_adjust_l_val(unsigned long rate, unsigned long prate, u32 quotient = rate; remainder = do_div(quotient, prate); - *l = quotient; - if ((remainder * 2) / prate) - *l = *l + 1; + *l = rate + (u32)(remainder * 2 >= prate); } static int clk_zonda_pll_set_rate(struct clk_hw *hw, unsigned long rate, |