summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2024-09-12 16:32:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2024-09-12 16:32:32 -0700
commit196145c606d0f816fd3926483cb1ff87e09c2c0b (patch)
treedf60b1cda66bf97340182db707db915336962c98
parentb8e7cd09ae543c1d384677b3d43e009a0e8647ca (diff)
parenta4d89b11aca3ffa73e234f06685261ce85e5fb41 (diff)
downloadlinux-196145c606d0f816fd3926483cb1ff87e09c2c0b.tar.gz
linux-196145c606d0f816fd3926483cb1ff87e09c2c0b.tar.bz2
linux-196145c606d0f816fd3926483cb1ff87e09c2c0b.zip
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()
-rw-r--r--drivers/clk/qcom/clk-alpha-pll.c4
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,