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

Configure Feed

Select the types of activity you want to include in your feed.

clk: samsung: cpu: 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>
Link: https://lore.kernel.org/r/20250811-clk-for-stephen-round-rate-v1-98-b3bf97b038dc@redhat.com
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Brian Masney and committed by
Krzysztof Kozlowski
05c58c94 1a713bd3

+7 -5
+7 -5
drivers/clk/samsung/clk-cpu.c
··· 567 567 /* -------------------------------------------------------------------------- */ 568 568 569 569 /* Common round rate callback usable for all types of CPU clocks */ 570 - static long exynos_cpuclk_round_rate(struct clk_hw *hw, unsigned long drate, 571 - unsigned long *prate) 570 + static int exynos_cpuclk_determine_rate(struct clk_hw *hw, 571 + struct clk_rate_request *req) 572 572 { 573 573 struct clk_hw *parent = clk_hw_get_parent(hw); 574 - *prate = clk_hw_round_rate(parent, drate); 575 - return *prate; 574 + req->best_parent_rate = clk_hw_round_rate(parent, req->rate); 575 + req->rate = req->best_parent_rate; 576 + 577 + return 0; 576 578 } 577 579 578 580 /* Common recalc rate callback usable for all types of CPU clocks */ ··· 593 591 594 592 static const struct clk_ops exynos_cpuclk_clk_ops = { 595 593 .recalc_rate = exynos_cpuclk_recalc_rate, 596 - .round_rate = exynos_cpuclk_round_rate, 594 + .determine_rate = exynos_cpuclk_determine_rate, 597 595 }; 598 596 599 597 /*