mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 09:04:39 +02:00
clk: sprd: div: 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: Chunyan Zhang <zhang.lyra@gmail.com> Signed-off-by: Brian Masney <bmasney@redhat.com>
This commit is contained in:
parent
19271e0d45
commit
deb4740a5f
|
|
@ -9,13 +9,16 @@
|
||||||
|
|
||||||
#include "div.h"
|
#include "div.h"
|
||||||
|
|
||||||
static long sprd_div_round_rate(struct clk_hw *hw, unsigned long rate,
|
static int sprd_div_determine_rate(struct clk_hw *hw,
|
||||||
unsigned long *parent_rate)
|
struct clk_rate_request *req)
|
||||||
{
|
{
|
||||||
struct sprd_div *cd = hw_to_sprd_div(hw);
|
struct sprd_div *cd = hw_to_sprd_div(hw);
|
||||||
|
|
||||||
return divider_round_rate(&cd->common.hw, rate, parent_rate, NULL,
|
req->rate = divider_round_rate(&cd->common.hw, req->rate,
|
||||||
cd->div.width, 0);
|
&req->best_parent_rate,
|
||||||
|
NULL, cd->div.width, 0);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long sprd_div_helper_recalc_rate(struct sprd_clk_common *common,
|
unsigned long sprd_div_helper_recalc_rate(struct sprd_clk_common *common,
|
||||||
|
|
@ -75,7 +78,7 @@ static int sprd_div_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||||
|
|
||||||
const struct clk_ops sprd_div_ops = {
|
const struct clk_ops sprd_div_ops = {
|
||||||
.recalc_rate = sprd_div_recalc_rate,
|
.recalc_rate = sprd_div_recalc_rate,
|
||||||
.round_rate = sprd_div_round_rate,
|
.determine_rate = sprd_div_determine_rate,
|
||||||
.set_rate = sprd_div_set_rate,
|
.set_rate = sprd_div_set_rate,
|
||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(sprd_div_ops);
|
EXPORT_SYMBOL_GPL(sprd_div_ops);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user