mirror of https://github.com/torvalds/linux.git
clk: cs2000-cp: 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:
parent
b2b354b075
commit
2233ab21bc
|
|
@ -305,15 +305,19 @@ static unsigned long cs2000_recalc_rate(struct clk_hw *hw,
|
||||||
return cs2000_ratio_to_rate(ratio, parent_rate, priv->lf_ratio);
|
return cs2000_ratio_to_rate(ratio, parent_rate, priv->lf_ratio);
|
||||||
}
|
}
|
||||||
|
|
||||||
static long cs2000_round_rate(struct clk_hw *hw, unsigned long rate,
|
static int cs2000_determine_rate(struct clk_hw *hw,
|
||||||
unsigned long *parent_rate)
|
struct clk_rate_request *req)
|
||||||
{
|
{
|
||||||
struct cs2000_priv *priv = hw_to_priv(hw);
|
struct cs2000_priv *priv = hw_to_priv(hw);
|
||||||
u32 ratio;
|
u32 ratio;
|
||||||
|
|
||||||
ratio = cs2000_rate_to_ratio(*parent_rate, rate, priv->lf_ratio);
|
ratio = cs2000_rate_to_ratio(req->best_parent_rate, req->rate,
|
||||||
|
priv->lf_ratio);
|
||||||
|
|
||||||
return cs2000_ratio_to_rate(ratio, *parent_rate, priv->lf_ratio);
|
req->rate = cs2000_ratio_to_rate(ratio, req->best_parent_rate,
|
||||||
|
priv->lf_ratio);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int cs2000_select_ratio_mode(struct cs2000_priv *priv,
|
static int cs2000_select_ratio_mode(struct cs2000_priv *priv,
|
||||||
|
|
@ -430,7 +434,7 @@ static u8 cs2000_get_parent(struct clk_hw *hw)
|
||||||
static const struct clk_ops cs2000_ops = {
|
static const struct clk_ops cs2000_ops = {
|
||||||
.get_parent = cs2000_get_parent,
|
.get_parent = cs2000_get_parent,
|
||||||
.recalc_rate = cs2000_recalc_rate,
|
.recalc_rate = cs2000_recalc_rate,
|
||||||
.round_rate = cs2000_round_rate,
|
.determine_rate = cs2000_determine_rate,
|
||||||
.set_rate = cs2000_set_rate,
|
.set_rate = cs2000_set_rate,
|
||||||
.prepare = cs2000_enable,
|
.prepare = cs2000_enable,
|
||||||
.unprepare = cs2000_disable,
|
.unprepare = cs2000_disable,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue