]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
clk: mxs: div: convert from round_rate() to determine_rate()
authorBrian Masney <bmasney@redhat.com>
Mon, 11 Aug 2025 15:18:24 +0000 (11:18 -0400)
committerBrian Masney <bmasney@redhat.com>
Mon, 8 Sep 2025 13:41:27 +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.

The change to call div->ops->determine_rate() instead of
div->ops->round_rate() was done by hand.

Signed-off-by: Brian Masney <bmasney@redhat.com>
drivers/clk/mxs/clk-div.c

index 0a78ef380646690938c352796fad8a13b086267a..8afe1a9c15524e02937e80de9d80bc367608a867 100644 (file)
@@ -40,12 +40,12 @@ static unsigned long clk_div_recalc_rate(struct clk_hw *hw,
        return div->ops->recalc_rate(&div->divider.hw, parent_rate);
 }
 
-static long clk_div_round_rate(struct clk_hw *hw, unsigned long rate,
-                              unsigned long *prate)
+static int clk_div_determine_rate(struct clk_hw *hw,
+                                 struct clk_rate_request *req)
 {
        struct clk_div *div = to_clk_div(hw);
 
-       return div->ops->round_rate(&div->divider.hw, rate, prate);
+       return div->ops->determine_rate(&div->divider.hw, req);
 }
 
 static int clk_div_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -63,7 +63,7 @@ static int clk_div_set_rate(struct clk_hw *hw, unsigned long rate,
 
 static const struct clk_ops clk_div_ops = {
        .recalc_rate = clk_div_recalc_rate,
-       .round_rate = clk_div_round_rate,
+       .determine_rate = clk_div_determine_rate,
        .set_rate = clk_div_set_rate,
 };