mirror of https://github.com/torvalds/linux.git
clk: sophgo: cv18xx-ip: 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: Alexander Sverdlin <alexander.sverdlin@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
ff04a06db6
commit
897c23b906
|
|
@ -45,10 +45,12 @@ static unsigned long gate_recalc_rate(struct clk_hw *hw,
|
|||
return parent_rate;
|
||||
}
|
||||
|
||||
static long gate_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
static int gate_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
return *parent_rate;
|
||||
req->rate = req->best_parent_rate;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int gate_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
|
@ -63,7 +65,7 @@ const struct clk_ops cv1800_clk_gate_ops = {
|
|||
.is_enabled = gate_is_enabled,
|
||||
|
||||
.recalc_rate = gate_recalc_rate,
|
||||
.round_rate = gate_round_rate,
|
||||
.determine_rate = gate_determine_rate,
|
||||
.set_rate = gate_set_rate,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue