Skip to content

Commit 65d2419

Browse files
masneybarndb
authored andcommitted
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>
1 parent 32cdf41 commit 65d2419

File tree

1 file changed

+5
-4
lines changed
  • arch/arm/mach-versatile

1 file changed

+5
-4
lines changed

arch/arm/mach-versatile/spc.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -497,12 +497,13 @@ static unsigned long spc_recalc_rate(struct clk_hw *hw,
497497
return freq * 1000;
498498
}
499499

500-
static long spc_round_rate(struct clk_hw *hw, unsigned long drate,
501-
unsigned long *parent_rate)
500+
static int spc_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
502501
{
503502
struct clk_spc *spc = to_clk_spc(hw);
504503

505-
return ve_spc_round_performance(spc->cluster, drate);
504+
req->rate = ve_spc_round_performance(spc->cluster, req->rate);
505+
506+
return 0;
506507
}
507508

508509
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,
515516

516517
static struct clk_ops clk_spc_ops = {
517518
.recalc_rate = spc_recalc_rate,
518-
.round_rate = spc_round_rate,
519+
.determine_rate = spc_determine_rate,
519520
.set_rate = spc_set_rate,
520521
};
521522

0 commit comments

Comments
 (0)