]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
clk: actions: owl-divider: convert from round_rate() to determine_rate()
authorBrian Masney <bmasney@redhat.com>
Mon, 11 Aug 2025 15:19:04 +0000 (11:19 -0400)
committerBrian Masney <bmasney@redhat.com>
Mon, 8 Sep 2025 13:41:29 +0000 (09:41 -0400)
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>
drivers/clk/actions/owl-divider.c

index cddac00fe324aef0c2dd723df280bade9728d07d..118f1393c6780f287d26736b2547a8b43751655a 100644 (file)
@@ -23,13 +23,16 @@ long owl_divider_helper_round_rate(struct owl_clk_common *common,
                                  div_hw->div_flags);
 }
 
-static long owl_divider_round_rate(struct clk_hw *hw, unsigned long rate,
-                               unsigned long *parent_rate)
+static int owl_divider_determine_rate(struct clk_hw *hw,
+                                     struct clk_rate_request *req)
 {
        struct owl_divider *div = hw_to_owl_divider(hw);
 
-       return owl_divider_helper_round_rate(&div->common, &div->div_hw,
-                                            rate, parent_rate);
+       req->rate = owl_divider_helper_round_rate(&div->common, &div->div_hw,
+                                                 req->rate,
+                                                 &req->best_parent_rate);
+
+       return 0;
 }
 
 unsigned long owl_divider_helper_recalc_rate(struct owl_clk_common *common,
@@ -89,6 +92,6 @@ static int owl_divider_set_rate(struct clk_hw *hw, unsigned long rate,
 
 const struct clk_ops owl_divider_ops = {
        .recalc_rate = owl_divider_recalc_rate,
-       .round_rate = owl_divider_round_rate,
+       .determine_rate = owl_divider_determine_rate,
        .set_rate = owl_divider_set_rate,
 };