Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+7 -5
+7 -5
drivers/clk/spear/clk-aux-synth.c
··· 49 49 (rtbl[index].yscale * eq)) * 10000; 50 50 } 51 51 52 - static long clk_aux_round_rate(struct clk_hw *hw, unsigned long drate, 53 - unsigned long *prate) 52 + static int clk_aux_determine_rate(struct clk_hw *hw, 53 + struct clk_rate_request *req) 54 54 { 55 55 struct clk_aux *aux = to_clk_aux(hw); 56 56 int unused; 57 57 58 - return clk_round_rate_index(hw, drate, *prate, aux_calc_rate, 59 - aux->rtbl_cnt, &unused); 58 + req->rate = clk_round_rate_index(hw, req->rate, req->best_parent_rate, 59 + aux_calc_rate, aux->rtbl_cnt, &unused); 60 + 61 + return 0; 60 62 } 61 63 62 64 static unsigned long clk_aux_recalc_rate(struct clk_hw *hw, ··· 129 127 130 128 static const struct clk_ops clk_aux_ops = { 131 129 .recalc_rate = clk_aux_recalc_rate, 132 - .round_rate = clk_aux_round_rate, 130 + .determine_rate = clk_aux_determine_rate, 133 131 .set_rate = clk_aux_set_rate, 134 132 }; 135 133