On Mon, 11 Aug 2025 at 23:18, Brian Masney via B4 Relay <devnull+bmasney.redhat.com@xxxxxxxxxx> wrote: > > From: Brian Masney <bmasney@xxxxxxxxxx> > > 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@xxxxxxxxxx> Reviewed-by: Chunyan Zhang <zhang.lyra@xxxxxxxxx> > --- > drivers/clk/sprd/div.c | 13 ++++++++----- > 1 file changed, 8 insertions(+), 5 deletions(-) > > diff --git a/drivers/clk/sprd/div.c b/drivers/clk/sprd/div.c > index 936782c241271832c0a1957c99cbecc287351d1b..013423881968002d29c4e9536e7cd7b944779196 100644 > --- a/drivers/clk/sprd/div.c > +++ b/drivers/clk/sprd/div.c > @@ -9,13 +9,16 @@ > > #include "div.h" > > -static long sprd_div_round_rate(struct clk_hw *hw, unsigned long rate, > - unsigned long *parent_rate) > +static int sprd_div_determine_rate(struct clk_hw *hw, > + struct clk_rate_request *req) > { > struct sprd_div *cd = hw_to_sprd_div(hw); > > - return divider_round_rate(&cd->common.hw, rate, parent_rate, NULL, > - cd->div.width, 0); > + req->rate = divider_round_rate(&cd->common.hw, req->rate, > + &req->best_parent_rate, > + NULL, cd->div.width, 0); > + > + return 0; > } > > unsigned long sprd_div_helper_recalc_rate(struct sprd_clk_common *common, > @@ -75,7 +78,7 @@ static int sprd_div_set_rate(struct clk_hw *hw, unsigned long rate, > > const struct clk_ops sprd_div_ops = { > .recalc_rate = sprd_div_recalc_rate, > - .round_rate = sprd_div_round_rate, > + .determine_rate = sprd_div_determine_rate, > .set_rate = sprd_div_set_rate, > }; > EXPORT_SYMBOL_GPL(sprd_div_ops); > > -- > 2.50.1 > >