]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
clk: tegra: periph: divider: convert from round_rate() to determine_rate()
authorBrian Masney <bmasney@redhat.com>
Wed, 3 Sep 2025 15:15:04 +0000 (11:15 -0400)
committerBrian Masney <bmasney@redhat.com>
Mon, 8 Sep 2025 16:50:41 +0000 (12:50 -0400)
The round_rate() clk ops is deprecated, so migrate this driver from
round_rate() to determine_rate().

Note that this change also requires the same migration to
drivers/clk/tegra/clk-divider.c.

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

index fa0cd7bb8ee67801dde3c65eababe30c96a176ef..6ebeaa7cb65648e77f11f2c676aa3428bc490a73 100644 (file)
@@ -51,16 +51,10 @@ static int clk_periph_determine_rate(struct clk_hw *hw,
        struct tegra_clk_periph *periph = to_clk_periph(hw);
        const struct clk_ops *div_ops = periph->div_ops;
        struct clk_hw *div_hw = &periph->divider.hw;
-       long rate;
 
        __clk_hw_set_clk(div_hw, hw);
 
-       rate = div_ops->round_rate(div_hw, req->rate, &req->best_parent_rate);
-       if (rate < 0)
-               return rate;
-
-       req->rate = (unsigned long)rate;
-       return 0;
+       return div_ops->determine_rate(div_hw, req);
 }
 
 static int clk_periph_set_rate(struct clk_hw *hw, unsigned long rate,