
On Sun, Feb 19, 2023 at 11:59:38PM -0600, Samuel Holland wrote:
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@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)
Reviewed-by: Michal Suchánek msuchanek@suse.de
Thanks
Michal