diff options
| author | Brian Masney <bmasney@redhat.com> | 2025-08-11 11:19:33 -0400 |
|---|---|---|
| committer | Brian Masney <bmasney@redhat.com> | 2025-09-08 09:41:30 -0400 |
| commit | f705ed70873e166a25b1332d4b4d7bdc4d14bd64 (patch) | |
| tree | 371f1871f2beed88ffe531256173af6021d71838 | |
| parent | d61a1ba87b64ac994895e4e7134e43dfd810f824 (diff) | |
| download | linux-next-f705ed70873e166a25b1332d4b4d7bdc4d14bd64.tar.gz linux-next-f705ed70873e166a25b1332d4b4d7bdc4d14bd64.zip | |
clk: spear: aux-synth: convert from round_rate() to determine_rate()
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate() using the Coccinelle semantic patch
on the cover letter of this series.
Signed-off-by: Brian Masney <bmasney@redhat.com>
| -rw-r--r-- | drivers/clk/spear/clk-aux-synth.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/clk/spear/clk-aux-synth.c b/drivers/clk/spear/clk-aux-synth.c index 637938e804f8..d0d063147af8 100644 --- a/drivers/clk/spear/clk-aux-synth.c +++ b/drivers/clk/spear/clk-aux-synth.c @@ -49,14 +49,16 @@ static unsigned long aux_calc_rate(struct clk_hw *hw, unsigned long prate, (rtbl[index].yscale * eq)) * 10000; } -static long clk_aux_round_rate(struct clk_hw *hw, unsigned long drate, - unsigned long *prate) +static int clk_aux_determine_rate(struct clk_hw *hw, + struct clk_rate_request *req) { struct clk_aux *aux = to_clk_aux(hw); int unused; - return clk_round_rate_index(hw, drate, *prate, aux_calc_rate, - aux->rtbl_cnt, &unused); + req->rate = clk_round_rate_index(hw, req->rate, req->best_parent_rate, + aux_calc_rate, aux->rtbl_cnt, &unused); + + return 0; } static unsigned long clk_aux_recalc_rate(struct clk_hw *hw, @@ -127,7 +129,7 @@ static int clk_aux_set_rate(struct clk_hw *hw, unsigned long drate, static const struct clk_ops clk_aux_ops = { .recalc_rate = clk_aux_recalc_rate, - .round_rate = clk_aux_round_rate, + .determine_rate = clk_aux_determine_rate, .set_rate = clk_aux_set_rate, }; |
