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

clk: baikal-t1: ccu-pll: 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>

+8 -6
+8 -6
drivers/clk/baikal-t1/ccu-pll.c
··· 228 228 } 229 229 } 230 230 231 - static long ccu_pll_round_rate(struct clk_hw *hw, unsigned long rate, 232 - unsigned long *parent_rate) 231 + static int ccu_pll_determine_rate(struct clk_hw *hw, 232 + struct clk_rate_request *req) 233 233 { 234 234 unsigned long nr = 1, nf = 1, od = 1; 235 235 236 - ccu_pll_calc_factors(rate, *parent_rate, &nr, &nf, &od); 236 + ccu_pll_calc_factors(req->rate, req->best_parent_rate, &nr, &nf, &od); 237 237 238 - return ccu_pll_calc_freq(*parent_rate, nr, nf, od); 238 + req->rate = ccu_pll_calc_freq(req->best_parent_rate, nr, nf, od); 239 + 240 + return 0; 239 241 } 240 242 241 243 /* ··· 483 481 .disable = ccu_pll_disable, 484 482 .is_enabled = ccu_pll_is_enabled, 485 483 .recalc_rate = ccu_pll_recalc_rate, 486 - .round_rate = ccu_pll_round_rate, 484 + .determine_rate = ccu_pll_determine_rate, 487 485 .set_rate = ccu_pll_set_rate_norst, 488 486 .debug_init = ccu_pll_debug_init 489 487 }; ··· 493 491 .disable = ccu_pll_disable, 494 492 .is_enabled = ccu_pll_is_enabled, 495 493 .recalc_rate = ccu_pll_recalc_rate, 496 - .round_rate = ccu_pll_round_rate, 494 + .determine_rate = ccu_pll_determine_rate, 497 495 .set_rate = ccu_pll_set_rate_reset, 498 496 .debug_init = ccu_pll_debug_init 499 497 };