> Subject: [PATCH 110/114] clk: visconti: pll: convert from round_rate() to > determine_rate() > > 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: Nobuhiro Iwamatsu <nobuhiro1.iwamatsu@xxxxxxxxxxxxx> > --- > drivers/clk/visconti/pll.c | 17 +++++++++++------ > 1 file changed, 11 insertions(+), 6 deletions(-) > > diff --git a/drivers/clk/visconti/pll.c b/drivers/clk/visconti/pll.c index > 8ca1bad61864204027b7aff9020f1cb9e7d198d3..681721d8503203de9ac49ac32 > 07e121bb5bf2163 100644 > --- a/drivers/clk/visconti/pll.c > +++ b/drivers/clk/visconti/pll.c > @@ -100,8 +100,8 @@ static unsigned long > visconti_get_pll_rate_from_data(struct visconti_pll *pll, > return rate_table[0].rate; > } > > -static long visconti_pll_round_rate(struct clk_hw *hw, > - unsigned long rate, unsigned long *prate) > +static int visconti_pll_determine_rate(struct clk_hw *hw, > + struct clk_rate_request *req) > { > struct visconti_pll *pll = to_visconti_pll(hw); > const struct visconti_pll_rate_table *rate_table = pll->rate_table; @@ > -109,11 +109,16 @@ static long visconti_pll_round_rate(struct clk_hw *hw, > > /* Assuming rate_table is in descending order */ > for (i = 0; i < pll->rate_count; i++) > - if (rate >= rate_table[i].rate) > - return rate_table[i].rate; > + if (req->rate >= rate_table[i].rate) { > + req->rate = rate_table[i].rate; > + > + return 0; > + } > > /* return minimum supported value */ > - return rate_table[i - 1].rate; > + req->rate = rate_table[i - 1].rate; > + > + return 0; > } > > static unsigned long visconti_pll_recalc_rate(struct clk_hw *hw, @@ -232,7 > +237,7 @@ static const struct clk_ops visconti_pll_ops = { > .enable = visconti_pll_enable, > .disable = visconti_pll_disable, > .is_enabled = visconti_pll_is_enabled, > - .round_rate = visconti_pll_round_rate, > + .determine_rate = visconti_pll_determine_rate, > .recalc_rate = visconti_pll_recalc_rate, > .set_rate = visconti_pll_set_rate, > }; > > -- > 2.50.1 Best regards, Nobuhiro