Skip to content

Commit eb7a492

Browse files
masneybbebarino
authored andcommitted
clk: imx: fixup-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. The change to call fixup_div->ops->determine_rate() instead of fixup_div->ops->round_rate() was done by hand. Signed-off-by: Brian Masney <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
1 parent 68a3312 commit eb7a492

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/clk/imx/clk-fixup-div.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,12 @@ static unsigned long clk_fixup_div_recalc_rate(struct clk_hw *hw,
4141
return fixup_div->ops->recalc_rate(&fixup_div->divider.hw, parent_rate);
4242
}
4343

44-
static long clk_fixup_div_round_rate(struct clk_hw *hw, unsigned long rate,
45-
unsigned long *prate)
44+
static int clk_fixup_div_determine_rate(struct clk_hw *hw,
45+
struct clk_rate_request *req)
4646
{
4747
struct clk_fixup_div *fixup_div = to_clk_fixup_div(hw);
4848

49-
return fixup_div->ops->round_rate(&fixup_div->divider.hw, rate, prate);
49+
return fixup_div->ops->determine_rate(&fixup_div->divider.hw, req);
5050
}
5151

5252
static int clk_fixup_div_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -81,7 +81,7 @@ static int clk_fixup_div_set_rate(struct clk_hw *hw, unsigned long rate,
8181

8282
static const struct clk_ops clk_fixup_div_ops = {
8383
.recalc_rate = clk_fixup_div_recalc_rate,
84-
.round_rate = clk_fixup_div_round_rate,
84+
.determine_rate = clk_fixup_div_determine_rate,
8585
.set_rate = clk_fixup_div_set_rate,
8686
};
8787

0 commit comments

Comments
 (0)