mirror of
https://github.com/torvalds/linux.git
synced 2026-06-02 03:24:19 +02:00
clk: at91: sam9x60-pll: 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:
parent
3c117b696a
commit
fcf9720171
|
|
@ -230,12 +230,16 @@ static long sam9x60_frac_pll_compute_mul_frac(struct sam9x60_pll_core *core,
|
|||
return tmprate;
|
||||
}
|
||||
|
||||
static long sam9x60_frac_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
static int sam9x60_frac_pll_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
|
||||
|
||||
return sam9x60_frac_pll_compute_mul_frac(core, rate, *parent_rate, false);
|
||||
req->rate = sam9x60_frac_pll_compute_mul_frac(core, req->rate,
|
||||
req->best_parent_rate,
|
||||
false);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sam9x60_frac_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
|
@ -321,7 +325,7 @@ static const struct clk_ops sam9x60_frac_pll_ops = {
|
|||
.unprepare = sam9x60_frac_pll_unprepare,
|
||||
.is_prepared = sam9x60_frac_pll_is_prepared,
|
||||
.recalc_rate = sam9x60_frac_pll_recalc_rate,
|
||||
.round_rate = sam9x60_frac_pll_round_rate,
|
||||
.determine_rate = sam9x60_frac_pll_determine_rate,
|
||||
.set_rate = sam9x60_frac_pll_set_rate,
|
||||
.save_context = sam9x60_frac_pll_save_context,
|
||||
.restore_context = sam9x60_frac_pll_restore_context,
|
||||
|
|
@ -332,7 +336,7 @@ static const struct clk_ops sam9x60_frac_pll_ops_chg = {
|
|||
.unprepare = sam9x60_frac_pll_unprepare,
|
||||
.is_prepared = sam9x60_frac_pll_is_prepared,
|
||||
.recalc_rate = sam9x60_frac_pll_recalc_rate,
|
||||
.round_rate = sam9x60_frac_pll_round_rate,
|
||||
.determine_rate = sam9x60_frac_pll_determine_rate,
|
||||
.set_rate = sam9x60_frac_pll_set_rate_chg,
|
||||
.save_context = sam9x60_frac_pll_save_context,
|
||||
.restore_context = sam9x60_frac_pll_restore_context,
|
||||
|
|
@ -487,12 +491,15 @@ static long sam9x60_div_pll_compute_div(struct sam9x60_pll_core *core,
|
|||
return best_rate;
|
||||
}
|
||||
|
||||
static long sam9x60_div_pll_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
static int sam9x60_div_pll_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
|
||||
|
||||
return sam9x60_div_pll_compute_div(core, parent_rate, rate);
|
||||
req->rate = sam9x60_div_pll_compute_div(core, &req->best_parent_rate,
|
||||
req->rate);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int sam9x60_div_pll_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
|
@ -601,7 +608,7 @@ static const struct clk_ops sam9x60_div_pll_ops = {
|
|||
.unprepare = sam9x60_div_pll_unprepare,
|
||||
.is_prepared = sam9x60_div_pll_is_prepared,
|
||||
.recalc_rate = sam9x60_div_pll_recalc_rate,
|
||||
.round_rate = sam9x60_div_pll_round_rate,
|
||||
.determine_rate = sam9x60_div_pll_determine_rate,
|
||||
.set_rate = sam9x60_div_pll_set_rate,
|
||||
.save_context = sam9x60_div_pll_save_context,
|
||||
.restore_context = sam9x60_div_pll_restore_context,
|
||||
|
|
@ -612,7 +619,7 @@ static const struct clk_ops sam9x60_div_pll_ops_chg = {
|
|||
.unprepare = sam9x60_div_pll_unprepare,
|
||||
.is_prepared = sam9x60_div_pll_is_prepared,
|
||||
.recalc_rate = sam9x60_div_pll_recalc_rate,
|
||||
.round_rate = sam9x60_div_pll_round_rate,
|
||||
.determine_rate = sam9x60_div_pll_determine_rate,
|
||||
.set_rate = sam9x60_div_pll_set_rate_chg,
|
||||
.save_context = sam9x60_div_pll_save_context,
|
||||
.restore_context = sam9x60_div_pll_restore_context,
|
||||
|
|
@ -623,7 +630,7 @@ static const struct clk_ops sam9x60_fixed_div_pll_ops = {
|
|||
.unprepare = sam9x60_div_pll_unprepare,
|
||||
.is_prepared = sam9x60_div_pll_is_prepared,
|
||||
.recalc_rate = sam9x60_fixed_div_pll_recalc_rate,
|
||||
.round_rate = sam9x60_div_pll_round_rate,
|
||||
.determine_rate = sam9x60_div_pll_determine_rate,
|
||||
.save_context = sam9x60_div_pll_save_context,
|
||||
.restore_context = sam9x60_div_pll_restore_context,
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user