mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
drm/pl111: 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. Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Brian Masney <bmasney@redhat.com> Link: https://lore.kernel.org/r/20250811-drm-clk-round-rate-v2-5-4a91ccf239cf@redhat.com Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>
This commit is contained in:
parent
a3e12b9c84
commit
b1a122f404
|
|
@ -473,12 +473,15 @@ static int pl111_clk_div_choose_div(struct clk_hw *hw, unsigned long rate,
|
|||
return best_div;
|
||||
}
|
||||
|
||||
static long pl111_clk_div_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *prate)
|
||||
static int pl111_clk_div_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
int div = pl111_clk_div_choose_div(hw, rate, prate, true);
|
||||
int div = pl111_clk_div_choose_div(hw, req->rate,
|
||||
&req->best_parent_rate, true);
|
||||
|
||||
return DIV_ROUND_UP_ULL(*prate, div);
|
||||
req->rate = DIV_ROUND_UP_ULL(req->best_parent_rate, div);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned long pl111_clk_div_recalc_rate(struct clk_hw *hw,
|
||||
|
|
@ -528,7 +531,7 @@ static int pl111_clk_div_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
|
||||
static const struct clk_ops pl111_clk_div_ops = {
|
||||
.recalc_rate = pl111_clk_div_recalc_rate,
|
||||
.round_rate = pl111_clk_div_round_rate,
|
||||
.determine_rate = pl111_clk_div_determine_rate,
|
||||
.set_rate = pl111_clk_div_set_rate,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user