]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
clk: renesas: rzg2l: convert from round_rate() to determine_rate()
authorBrian Masney <bmasney@redhat.com>
Mon, 11 Aug 2025 15:19:24 +0000 (11:19 -0400)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 20 Aug 2025 07:16:32 +0000 (09:16 +0200)
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>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/20250811-clk-for-stephen-round-rate-v1-92-b3bf97b038dc@redhat.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/clk/renesas/rzg2l-cpg.c

index 187233302818a66a763daefdd1c982b2a6e4e71f..b508823f9723c27678aafb46eb28e3b04f011636 100644 (file)
@@ -824,11 +824,10 @@ static unsigned long rzg2l_cpg_sipll5_recalc_rate(struct clk_hw *hw,
        return pll5_rate;
 }
 
-static long rzg2l_cpg_sipll5_round_rate(struct clk_hw *hw,
-                                       unsigned long rate,
-                                       unsigned long *parent_rate)
+static int rzg2l_cpg_sipll5_determine_rate(struct clk_hw *hw,
+                                          struct clk_rate_request *req)
 {
-       return rate;
+       return 0;
 }
 
 static int rzg2l_cpg_sipll5_set_rate(struct clk_hw *hw,
@@ -902,7 +901,7 @@ static int rzg2l_cpg_sipll5_set_rate(struct clk_hw *hw,
 
 static const struct clk_ops rzg2l_cpg_sipll5_ops = {
        .recalc_rate = rzg2l_cpg_sipll5_recalc_rate,
-       .round_rate = rzg2l_cpg_sipll5_round_rate,
+       .determine_rate = rzg2l_cpg_sipll5_determine_rate,
        .set_rate = rzg2l_cpg_sipll5_set_rate,
 };