mirror of
https://github.com/torvalds/linux.git
synced 2025-11-30 23:16:01 +07:00
clk: loongson1: 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:
@@ -93,14 +93,16 @@ static unsigned long ls1x_divider_recalc_rate(struct clk_hw *hw,
|
|||||||
d->flags, d->width);
|
d->flags, d->width);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long ls1x_divider_round_rate(struct clk_hw *hw, unsigned long rate,
|
static int ls1x_divider_determine_rate(struct clk_hw *hw,
|
||||||
unsigned long *prate)
|
struct clk_rate_request *req)
|
||||||
{
|
{
|
||||||
struct ls1x_clk *ls1x_clk = to_ls1x_clk(hw);
|
struct ls1x_clk *ls1x_clk = to_ls1x_clk(hw);
|
||||||
const struct ls1x_clk_div_data *d = ls1x_clk->data;
|
const struct ls1x_clk_div_data *d = ls1x_clk->data;
|
||||||
|
|
||||||
return divider_round_rate(hw, rate, prate, d->table,
|
req->rate = divider_round_rate(hw, req->rate, &req->best_parent_rate,
|
||||||
d->width, d->flags);
|
d->table, d->width, d->flags);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ls1x_divider_set_rate(struct clk_hw *hw, unsigned long rate,
|
static int ls1x_divider_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||||
@@ -146,7 +148,7 @@ static int ls1x_divider_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||||||
|
|
||||||
static const struct clk_ops ls1x_clk_divider_ops = {
|
static const struct clk_ops ls1x_clk_divider_ops = {
|
||||||
.recalc_rate = ls1x_divider_recalc_rate,
|
.recalc_rate = ls1x_divider_recalc_rate,
|
||||||
.round_rate = ls1x_divider_round_rate,
|
.determine_rate = ls1x_divider_determine_rate,
|
||||||
.set_rate = ls1x_divider_set_rate,
|
.set_rate = ls1x_divider_set_rate,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user