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.

drm/mcde/mcde_clk_div: 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-2-4a91ccf239cf@redhat.com
Signed-off-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com>

authored by

Brian Masney and committed by
Raphael Gallais-Pou
a3e12b9c 6a197747

+8 -5
+8 -5
drivers/gpu/drm/mcde/mcde_clk_div.c
··· 71 71 return best_div; 72 72 } 73 73 74 - static long mcde_clk_div_round_rate(struct clk_hw *hw, unsigned long rate, 75 - unsigned long *prate) 74 + static int mcde_clk_div_determine_rate(struct clk_hw *hw, 75 + struct clk_rate_request *req) 76 76 { 77 - int div = mcde_clk_div_choose_div(hw, rate, prate, true); 77 + int div = mcde_clk_div_choose_div(hw, req->rate, 78 + &req->best_parent_rate, true); 78 79 79 - return DIV_ROUND_UP_ULL(*prate, div); 80 + req->rate = DIV_ROUND_UP_ULL(req->best_parent_rate, div); 81 + 82 + return 0; 80 83 } 81 84 82 85 static unsigned long mcde_clk_div_recalc_rate(struct clk_hw *hw, ··· 135 132 static const struct clk_ops mcde_clk_div_ops = { 136 133 .enable = mcde_clk_div_enable, 137 134 .recalc_rate = mcde_clk_div_recalc_rate, 138 - .round_rate = mcde_clk_div_round_rate, 135 + .determine_rate = mcde_clk_div_determine_rate, 139 136 .set_rate = mcde_clk_div_set_rate, 140 137 }; 141 138