Commit 7a19c341 authored by Brian Masney's avatar Brian Masney
Browse files

clk: ux500: prcmu: 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: default avatarLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarBrian Masney <bmasney@redhat.com>
parent f32c0f8b
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -53,11 +53,13 @@ static unsigned long clk_prcmu_recalc_rate(struct clk_hw *hw,
	return prcmu_clock_rate(clk->cg_sel);
}

static long clk_prcmu_round_rate(struct clk_hw *hw, unsigned long rate,
				 unsigned long *parent_rate)
static int clk_prcmu_determine_rate(struct clk_hw *hw,
				    struct clk_rate_request *req)
{
	struct clk_prcmu *clk = to_clk_prcmu(hw);
	return prcmu_round_clock_rate(clk->cg_sel, rate);
	req->rate = prcmu_round_clock_rate(clk->cg_sel, req->rate);

	return 0;
}

static int clk_prcmu_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -157,7 +159,7 @@ static const struct clk_ops clk_prcmu_scalable_ops = {
	.prepare = clk_prcmu_prepare,
	.unprepare = clk_prcmu_unprepare,
	.recalc_rate = clk_prcmu_recalc_rate,
	.round_rate = clk_prcmu_round_rate,
	.determine_rate = clk_prcmu_determine_rate,
	.set_rate = clk_prcmu_set_rate,
};

@@ -169,7 +171,7 @@ static const struct clk_ops clk_prcmu_gate_ops = {

static const struct clk_ops clk_prcmu_scalable_rate_ops = {
	.recalc_rate = clk_prcmu_recalc_rate,
	.round_rate = clk_prcmu_round_rate,
	.determine_rate = clk_prcmu_determine_rate,
	.set_rate = clk_prcmu_set_rate,
};

@@ -187,7 +189,7 @@ static const struct clk_ops clk_prcmu_opp_volt_scalable_ops = {
	.prepare = clk_prcmu_opp_volt_prepare,
	.unprepare = clk_prcmu_opp_volt_unprepare,
	.recalc_rate = clk_prcmu_recalc_rate,
	.round_rate = clk_prcmu_round_rate,
	.determine_rate = clk_prcmu_determine_rate,
	.set_rate = clk_prcmu_set_rate,
};