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

clk: spear: frac-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-frac-synth.c
··· 52 52 return prate; 53 53 } 54 54 55 - static long clk_frac_round_rate(struct clk_hw *hw, unsigned long drate, 56 - unsigned long *prate) 55 + static int clk_frac_determine_rate(struct clk_hw *hw, 56 + struct clk_rate_request *req) 57 57 { 58 58 struct clk_frac *frac = to_clk_frac(hw); 59 59 int unused; 60 60 61 - return clk_round_rate_index(hw, drate, *prate, frac_calc_rate, 62 - frac->rtbl_cnt, &unused); 61 + req->rate = clk_round_rate_index(hw, req->rate, req->best_parent_rate, 62 + frac_calc_rate, frac->rtbl_cnt, &unused); 63 + 64 + return 0; 63 65 } 64 66 65 67 static unsigned long clk_frac_recalc_rate(struct clk_hw *hw, ··· 117 115 118 116 static const struct clk_ops clk_frac_ops = { 119 117 .recalc_rate = clk_frac_recalc_rate, 120 - .round_rate = clk_frac_round_rate, 118 + .determine_rate = clk_frac_determine_rate, 121 119 .set_rate = clk_frac_set_rate, 122 120 }; 123 121