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

clk: loongson1: 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-loongson1.c
··· 93 93 d->flags, d->width); 94 94 } 95 95 96 - static long ls1x_divider_round_rate(struct clk_hw *hw, unsigned long rate, 97 - unsigned long *prate) 96 + static int ls1x_divider_determine_rate(struct clk_hw *hw, 97 + struct clk_rate_request *req) 98 98 { 99 99 struct ls1x_clk *ls1x_clk = to_ls1x_clk(hw); 100 100 const struct ls1x_clk_div_data *d = ls1x_clk->data; 101 101 102 - return divider_round_rate(hw, rate, prate, d->table, 103 - d->width, d->flags); 102 + req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate, 103 + d->table, d->width, d->flags); 104 + 105 + return 0; 104 106 } 105 107 106 108 static int ls1x_divider_set_rate(struct clk_hw *hw, unsigned long rate, ··· 148 146 149 147 static const struct clk_ops ls1x_clk_divider_ops = { 150 148 .recalc_rate = ls1x_divider_recalc_rate, 151 - .round_rate = ls1x_divider_round_rate, 149 + .determine_rate = ls1x_divider_determine_rate, 152 150 .set_rate = ls1x_divider_set_rate, 153 151 }; 154 152