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

clk: tps68470: 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/clk-tps68470.c
··· 146 146 return best_idx; 147 147 } 148 148 149 - static long tps68470_clk_round_rate(struct clk_hw *hw, unsigned long rate, 150 - unsigned long *parent_rate) 149 + static int tps68470_clk_determine_rate(struct clk_hw *hw, 150 + struct clk_rate_request *req) 151 151 { 152 - unsigned int idx = tps68470_clk_cfg_lookup(rate); 152 + unsigned int idx = tps68470_clk_cfg_lookup(req->rate); 153 153 154 - return clk_freqs[idx].freq; 154 + req->rate = clk_freqs[idx].freq; 155 + 156 + return 0; 155 157 } 156 158 157 159 static int tps68470_clk_set_rate(struct clk_hw *hw, unsigned long rate, ··· 188 186 .prepare = tps68470_clk_prepare, 189 187 .unprepare = tps68470_clk_unprepare, 190 188 .recalc_rate = tps68470_clk_recalc_rate, 191 - .round_rate = tps68470_clk_round_rate, 189 + .determine_rate = tps68470_clk_determine_rate, 192 190 .set_rate = tps68470_clk_set_rate, 193 191 }; 194 192