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

clk: sophgo: cv18xx-ip: 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: Alexander Sverdlin <alexander.sverdlin@gmail.com>
Signed-off-by: Brian Masney <bmasney@redhat.com>

+6 -4
+6 -4
drivers/clk/sophgo/clk-cv18xx-ip.c
··· 45 45 return parent_rate; 46 46 } 47 47 48 - static long gate_round_rate(struct clk_hw *hw, unsigned long rate, 49 - unsigned long *parent_rate) 48 + static int gate_determine_rate(struct clk_hw *hw, 49 + struct clk_rate_request *req) 50 50 { 51 - return *parent_rate; 51 + req->rate = req->best_parent_rate; 52 + 53 + return 0; 52 54 } 53 55 54 56 static int gate_set_rate(struct clk_hw *hw, unsigned long rate, ··· 65 63 .is_enabled = gate_is_enabled, 66 64 67 65 .recalc_rate = gate_recalc_rate, 68 - .round_rate = gate_round_rate, 66 + .determine_rate = gate_determine_rate, 69 67 .set_rate = gate_set_rate, 70 68 }; 71 69