mirror of https://github.com/torvalds/linux.git
ARM: versatile: clock: 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> Acked-by: Sudeep Holla <sudeep.holla@arm.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Link: https://lore.kernel.org/r/20251001061100.372737-1-linus.walleij@linaro.org Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
parent
32cdf411b4
commit
65d2419f93
|
|
@ -497,12 +497,13 @@ static unsigned long spc_recalc_rate(struct clk_hw *hw,
|
||||||
return freq * 1000;
|
return freq * 1000;
|
||||||
}
|
}
|
||||||
|
|
||||||
static long spc_round_rate(struct clk_hw *hw, unsigned long drate,
|
static int spc_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
|
||||||
unsigned long *parent_rate)
|
|
||||||
{
|
{
|
||||||
struct clk_spc *spc = to_clk_spc(hw);
|
struct clk_spc *spc = to_clk_spc(hw);
|
||||||
|
|
||||||
return ve_spc_round_performance(spc->cluster, drate);
|
req->rate = ve_spc_round_performance(spc->cluster, req->rate);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int spc_set_rate(struct clk_hw *hw, unsigned long rate,
|
static int spc_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||||
|
|
@ -515,7 +516,7 @@ static int spc_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||||
|
|
||||||
static struct clk_ops clk_spc_ops = {
|
static struct clk_ops clk_spc_ops = {
|
||||||
.recalc_rate = spc_recalc_rate,
|
.recalc_rate = spc_recalc_rate,
|
||||||
.round_rate = spc_round_rate,
|
.determine_rate = spc_determine_rate,
|
||||||
.set_rate = spc_set_rate,
|
.set_rate = spc_set_rate,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue