[PATCH 5/6] clk: Remove an unneeded check from clk_get_parent_rate()
Samuel Holland
samuel at sholland.org
Mon Feb 20 06:59:38 CET 2023
There is no need to check the parent clock's ops. The following call to
clk_get_rate() does that already.
Signed-off-by: Samuel Holland <samuel at sholland.org>
---
drivers/clk/clk-uclass.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/clk/clk-uclass.c b/drivers/clk/clk-uclass.c
index 9d052e5a814..53cfd819779 100644
--- a/drivers/clk/clk-uclass.c
+++ b/drivers/clk/clk-uclass.c
@@ -504,7 +504,6 @@ struct clk *clk_get_parent(struct clk *clk)
ulong clk_get_parent_rate(struct clk *clk)
{
- const struct clk_ops *ops;
struct clk *pclk;
debug("%s(clk=%p)\n", __func__, clk);
@@ -515,10 +514,6 @@ ulong clk_get_parent_rate(struct clk *clk)
if (IS_ERR(pclk))
return -ENODEV;
- ops = clk_dev_ops(pclk->dev);
- if (!ops->get_rate)
- return -ENOSYS;
-
/* Read the 'rate' if not already set or if proper flag set*/
if (!pclk->rate || IS_ERR_VALUE(pclk->rate) ||
pclk->flags & CLK_GET_RATE_NOCACHE)
--
2.39.2
More information about the U-Boot
mailing list