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

clk: ux500: prcmu: 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.

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Brian Masney <bmasney@redhat.com>

+8 -6
+8 -6
drivers/clk/ux500/clk-prcmu.c
··· 53 53 return prcmu_clock_rate(clk->cg_sel); 54 54 } 55 55 56 - static long clk_prcmu_round_rate(struct clk_hw *hw, unsigned long rate, 57 - unsigned long *parent_rate) 56 + static int clk_prcmu_determine_rate(struct clk_hw *hw, 57 + struct clk_rate_request *req) 58 58 { 59 59 struct clk_prcmu *clk = to_clk_prcmu(hw); 60 - return prcmu_round_clock_rate(clk->cg_sel, rate); 60 + req->rate = prcmu_round_clock_rate(clk->cg_sel, req->rate); 61 + 62 + return 0; 61 63 } 62 64 63 65 static int clk_prcmu_set_rate(struct clk_hw *hw, unsigned long rate, ··· 159 157 .prepare = clk_prcmu_prepare, 160 158 .unprepare = clk_prcmu_unprepare, 161 159 .recalc_rate = clk_prcmu_recalc_rate, 162 - .round_rate = clk_prcmu_round_rate, 160 + .determine_rate = clk_prcmu_determine_rate, 163 161 .set_rate = clk_prcmu_set_rate, 164 162 }; 165 163 ··· 171 169 172 170 static const struct clk_ops clk_prcmu_scalable_rate_ops = { 173 171 .recalc_rate = clk_prcmu_recalc_rate, 174 - .round_rate = clk_prcmu_round_rate, 172 + .determine_rate = clk_prcmu_determine_rate, 175 173 .set_rate = clk_prcmu_set_rate, 176 174 }; 177 175 ··· 189 187 .prepare = clk_prcmu_opp_volt_prepare, 190 188 .unprepare = clk_prcmu_opp_volt_unprepare, 191 189 .recalc_rate = clk_prcmu_recalc_rate, 192 - .round_rate = clk_prcmu_round_rate, 190 + .determine_rate = clk_prcmu_determine_rate, 193 191 .set_rate = clk_prcmu_set_rate, 194 192 }; 195 193