Commit eb785c6f authored by Brian Masney's avatar Brian Masney
Browse files

clk: tps68470: 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: default avatarBrian Masney <bmasney@redhat.com>
parent 81c438b5
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -146,12 +146,14 @@ static unsigned int tps68470_clk_cfg_lookup(unsigned long rate)
	return best_idx;
}

static long tps68470_clk_round_rate(struct clk_hw *hw, unsigned long rate,
				    unsigned long *parent_rate)
static int tps68470_clk_determine_rate(struct clk_hw *hw,
				       struct clk_rate_request *req)
{
	unsigned int idx = tps68470_clk_cfg_lookup(rate);
	unsigned int idx = tps68470_clk_cfg_lookup(req->rate);

	req->rate = clk_freqs[idx].freq;

	return clk_freqs[idx].freq;
	return 0;
}

static int tps68470_clk_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -186,7 +188,7 @@ static const struct clk_ops tps68470_clk_ops = {
	.prepare = tps68470_clk_prepare,
	.unprepare = tps68470_clk_unprepare,
	.recalc_rate = tps68470_clk_recalc_rate,
	.round_rate = tps68470_clk_round_rate,
	.determine_rate = tps68470_clk_determine_rate,
	.set_rate = tps68470_clk_set_rate,
};