Skip to content

Commit

Permalink
Merge tag 'clk-fixes-for-linus' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/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()
  • Loading branch information
torvalds committed Sep 12, 2024
2 parents b8e7cd0 + a4d89b1 commit 196145c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/clk/qcom/clk-alpha-pll.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 196145c

Please sign in to comment.