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

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>

authored by

Brian Masney and committed by
Arnd Bergmann
65d2419f 32cdf411

+5 -4
+5 -4
arch/arm/mach-versatile/spc.c
··· 497 497 return freq * 1000; 498 498 } 499 499 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) 502 501 { 503 502 struct clk_spc *spc = to_clk_spc(hw); 504 503 505 - return ve_spc_round_performance(spc->cluster, drate); 504 + req->rate = ve_spc_round_performance(spc->cluster, req->rate); 505 + 506 + return 0; 506 507 } 507 508 508 509 static int spc_set_rate(struct clk_hw *hw, unsigned long rate, ··· 516 515 517 516 static struct clk_ops clk_spc_ops = { 518 517 .recalc_rate = spc_recalc_rate, 519 - .round_rate = spc_round_rate, 518 + .determine_rate = spc_determine_rate, 520 519 .set_rate = spc_set_rate, 521 520 }; 522 521