clk: stm32f4: Switch to clk_divider.determine_rate
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Fri, 2 Jul 2021 22:51:43 +0000 (00:51 +0200)
committerStephen Boyd <sboyd@kernel.org>
Fri, 6 Aug 2021 00:36:10 +0000 (17:36 -0700)
.determine_rate is meant to replace .round_rate in CCF in the future.
Switch over to .determine_rate now that clk_divider_ops has gained
support for that.

Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: linux-stm32@st-md-mailman.stormreply.com
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://lore.kernel.org/r/20210702225145.2643303-5-martin.blumenstingl@googlemail.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
drivers/clk/clk-stm32f4.c

index 18117ce5ff85fa35d517e508ca970d4435bcccf8..22267fb3e92e7639c3ecf87ffb96a3e46197da96 100644 (file)
@@ -709,10 +709,10 @@ static unsigned long stm32f4_pll_div_recalc_rate(struct clk_hw *hw,
        return clk_divider_ops.recalc_rate(hw, parent_rate);
 }
 
-static long stm32f4_pll_div_round_rate(struct clk_hw *hw, unsigned long rate,
-                               unsigned long *prate)
+static int stm32f4_pll_div_determine_rate(struct clk_hw *hw,
+                                         struct clk_rate_request *req)
 {
-       return clk_divider_ops.round_rate(hw, rate, prate);
+       return clk_divider_ops.determine_rate(hw, req);
 }
 
 static int stm32f4_pll_div_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -738,7 +738,7 @@ static int stm32f4_pll_div_set_rate(struct clk_hw *hw, unsigned long rate,
 
 static const struct clk_ops stm32f4_pll_div_ops = {
        .recalc_rate = stm32f4_pll_div_recalc_rate,
-       .round_rate = stm32f4_pll_div_round_rate,
+       .determine_rate = stm32f4_pll_div_determine_rate,
        .set_rate = stm32f4_pll_div_set_rate,
 };