mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
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>
This commit is contained in:
parent
1a713bd3b0
commit
05c58c9415
|
|
@ -567,12 +567,14 @@ static int exynos850_cpuclk_post_rate_change(struct clk_notifier_data *ndata,
|
|||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
/* Common round rate callback usable for all types of CPU clocks */
|
||||
static long exynos_cpuclk_round_rate(struct clk_hw *hw, unsigned long drate,
|
||||
unsigned long *prate)
|
||||
static int exynos_cpuclk_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct clk_hw *parent = clk_hw_get_parent(hw);
|
||||
*prate = clk_hw_round_rate(parent, drate);
|
||||
return *prate;
|
||||
req->best_parent_rate = clk_hw_round_rate(parent, req->rate);
|
||||
req->rate = req->best_parent_rate;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Common recalc rate callback usable for all types of CPU clocks */
|
||||
|
|
@ -591,7 +593,7 @@ static unsigned long exynos_cpuclk_recalc_rate(struct clk_hw *hw,
|
|||
|
||||
static const struct clk_ops exynos_cpuclk_clk_ops = {
|
||||
.recalc_rate = exynos_cpuclk_recalc_rate,
|
||||
.round_rate = exynos_cpuclk_round_rate,
|
||||
.determine_rate = exynos_cpuclk_determine_rate,
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user