mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2026-03-03 18:28:01 +01:00
clk: nuvoton: ma35d1-divider: 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>
This commit is contained in:
@@ -39,12 +39,16 @@ static unsigned long ma35d1_clkdiv_recalc_rate(struct clk_hw *hw, unsigned long
|
||||
CLK_DIVIDER_ROUND_CLOSEST, dclk->width);
|
||||
}
|
||||
|
||||
static long ma35d1_clkdiv_round_rate(struct clk_hw *hw, unsigned long rate, unsigned long *prate)
|
||||
static int ma35d1_clkdiv_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct ma35d1_adc_clk_div *dclk = to_ma35d1_adc_clk_div(hw);
|
||||
|
||||
return divider_round_rate(hw, rate, prate, dclk->table,
|
||||
dclk->width, CLK_DIVIDER_ROUND_CLOSEST);
|
||||
req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate,
|
||||
dclk->table, dclk->width,
|
||||
CLK_DIVIDER_ROUND_CLOSEST);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ma35d1_clkdiv_set_rate(struct clk_hw *hw, unsigned long rate, unsigned long parent_rate)
|
||||
@@ -71,7 +75,7 @@ static int ma35d1_clkdiv_set_rate(struct clk_hw *hw, unsigned long rate, unsigne
|
||||
|
||||
static const struct clk_ops ma35d1_adc_clkdiv_ops = {
|
||||
.recalc_rate = ma35d1_clkdiv_recalc_rate,
|
||||
.round_rate = ma35d1_clkdiv_round_rate,
|
||||
.determine_rate = ma35d1_clkdiv_determine_rate,
|
||||
.set_rate = ma35d1_clkdiv_set_rate,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user