mirror of
https://github.com/torvalds/linux.git
synced 2026-03-13 23:46:14 +01:00
clk: ingenic: cgu: 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: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
d983ced6cf
commit
93fc8a13df
1 changed files with 7 additions and 5 deletions
|
|
@ -174,14 +174,16 @@ ingenic_pll_calc(const struct ingenic_cgu_clk_info *clk_info,
|
|||
n * od);
|
||||
}
|
||||
|
||||
static long
|
||||
ingenic_pll_round_rate(struct clk_hw *hw, unsigned long req_rate,
|
||||
unsigned long *prate)
|
||||
static int ingenic_pll_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct ingenic_clk *ingenic_clk = to_ingenic_clk(hw);
|
||||
const struct ingenic_cgu_clk_info *clk_info = to_clk_info(ingenic_clk);
|
||||
|
||||
return ingenic_pll_calc(clk_info, req_rate, *prate, NULL, NULL, NULL);
|
||||
req->rate = ingenic_pll_calc(clk_info, req->rate, req->best_parent_rate,
|
||||
NULL, NULL, NULL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int ingenic_pll_check_stable(struct ingenic_cgu *cgu,
|
||||
|
|
@ -317,7 +319,7 @@ static int ingenic_pll_is_enabled(struct clk_hw *hw)
|
|||
|
||||
static const struct clk_ops ingenic_pll_ops = {
|
||||
.recalc_rate = ingenic_pll_recalc_rate,
|
||||
.round_rate = ingenic_pll_round_rate,
|
||||
.determine_rate = ingenic_pll_determine_rate,
|
||||
.set_rate = ingenic_pll_set_rate,
|
||||
|
||||
.enable = ingenic_pll_enable,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue