Skip to content

Commit 68a3312

Browse files
masneybbebarino
authored andcommitted
clk: imx: cpu: 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 <[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 62a8881 commit 68a3312

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

drivers/clk/imx/clk-cpu.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,14 @@ static unsigned long clk_cpu_recalc_rate(struct clk_hw *hw,
3030
return clk_get_rate(cpu->div);
3131
}
3232

33-
static long clk_cpu_round_rate(struct clk_hw *hw, unsigned long rate,
34-
unsigned long *prate)
33+
static int clk_cpu_determine_rate(struct clk_hw *hw,
34+
struct clk_rate_request *req)
3535
{
3636
struct clk_cpu *cpu = to_clk_cpu(hw);
3737

38-
return clk_round_rate(cpu->pll, rate);
38+
req->rate = clk_round_rate(cpu->pll, req->rate);
39+
40+
return 0;
3941
}
4042

4143
static int clk_cpu_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -66,7 +68,7 @@ static int clk_cpu_set_rate(struct clk_hw *hw, unsigned long rate,
6668

6769
static const struct clk_ops clk_cpu_ops = {
6870
.recalc_rate = clk_cpu_recalc_rate,
69-
.round_rate = clk_cpu_round_rate,
71+
.determine_rate = clk_cpu_determine_rate,
7072
.set_rate = clk_cpu_set_rate,
7173
};
7274

0 commit comments

Comments
 (0)