mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 06:01:57 +00:00
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>
This commit is contained in:
parent
33b70fbc4f
commit
e2533dad2f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user