]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
clk: qcom: rpmh: convert from round_rate() to determine_rate()
authorBrian Masney <bmasney@redhat.com>
Thu, 3 Jul 2025 23:22:28 +0000 (19:22 -0400)
committerBjorn Andersson <andersson@kernel.org>
Thu, 17 Jul 2025 04:12:56 +0000 (23:12 -0500)
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: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250703-clk-cocci-drop-round-rate-v1-4-3a8da898367e@redhat.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
drivers/clk/qcom/clk-rpmh.c

index 00fb3e53a388ed24ed76622983eb5bd81a6b7002..74b052ac1ee10bdeeb59880019fb06ad58db3f74 100644 (file)
@@ -321,10 +321,10 @@ static int clk_rpmh_bcm_set_rate(struct clk_hw *hw, unsigned long rate,
        return 0;
 }
 
-static long clk_rpmh_round_rate(struct clk_hw *hw, unsigned long rate,
-                               unsigned long *parent_rate)
+static int clk_rpmh_determine_rate(struct clk_hw *hw,
+                                  struct clk_rate_request *req)
 {
-       return rate;
+       return 0;
 }
 
 static unsigned long clk_rpmh_bcm_recalc_rate(struct clk_hw *hw,
@@ -339,7 +339,7 @@ static const struct clk_ops clk_rpmh_bcm_ops = {
        .prepare        = clk_rpmh_bcm_prepare,
        .unprepare      = clk_rpmh_bcm_unprepare,
        .set_rate       = clk_rpmh_bcm_set_rate,
-       .round_rate     = clk_rpmh_round_rate,
+       .determine_rate = clk_rpmh_determine_rate,
        .recalc_rate    = clk_rpmh_bcm_recalc_rate,
 };