diff options
author | Maxime Ripard <maxime@cerno.tech> | 2023-05-05 14:25:07 +0300 |
---|---|---|
committer | Stephen Boyd <sboyd@kernel.org> | 2023-06-09 04:39:25 +0300 |
commit | e2533dad2f683976166d365aaeec65af7841a2de (patch) | |
tree | 4bc1128e9589137afe51e2b46975f472bd5199a9 /drivers/clk/clk-lan966x.c | |
parent | 33b70fbc4f815f0acb327fa506c988ef25cd943d (diff) | |
download | linux-e2533dad2f683976166d365aaeec65af7841a2de.tar.xz |
clk: lan966x: Remove unused round_rate hook
The lan966x driver registers a gck clock with both a determine_rate and
a round_rate implementation. Both are equivalent, and are only called by
clk_core_determine_round_nolock() which favors determine_rate.
Thus, lan966x_gck_round_rate() is never called, so we can just remove
it.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://lore.kernel.org/r/20221018-clk-range-checks-fixes-v4-5-971d5077e7d2@cerno.tech
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Diffstat (limited to 'drivers/clk/clk-lan966x.c')
-rw-r--r-- | drivers/clk/clk-lan966x.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/drivers/clk/clk-lan966x.c b/drivers/clk/clk-lan966x.c index 460e7216bfa1..870fd7df50c1 100644 --- a/drivers/clk/clk-lan966x.c +++ b/drivers/clk/clk-lan966x.c @@ -103,22 +103,6 @@ static int lan966x_gck_set_rate(struct clk_hw *hw, return 0; } -static long lan966x_gck_round_rate(struct clk_hw *hw, unsigned long rate, - unsigned long *parent_rate) -{ - unsigned int div; - - if (rate == 0 || *parent_rate == 0) - return -EINVAL; - - if (rate >= *parent_rate) - return *parent_rate; - - div = DIV_ROUND_CLOSEST(*parent_rate, rate); - - return *parent_rate / div; -} - static unsigned long lan966x_gck_recalc_rate(struct clk_hw *hw, unsigned long parent_rate) { @@ -177,7 +161,6 @@ static const struct clk_ops lan966x_gck_ops = { .enable = lan966x_gck_enable, .disable = lan966x_gck_disable, .set_rate = lan966x_gck_set_rate, - .round_rate = lan966x_gck_round_rate, .recalc_rate = lan966x_gck_recalc_rate, .determine_rate = lan966x_gck_determine_rate, .set_parent = lan966x_gck_set_parent, |