Use clock-names property which is accessible via parent clock OF node
to look up the parent clock by name instead of depending on unreliable
global clock name to perform look up.

Signed-off-by: Marek Vasut <[email protected]>
---
Cc: Adam Ford <[email protected]>
Cc: Christoph Niedermaier <[email protected]>
Cc: Dong Aisheng <[email protected]>
Cc: Fabio Estevam <[email protected]>
Cc: Hou Zhiqiang <[email protected]>
Cc: Michael Trimarchi <[email protected]>
Cc: Peng Fan <[email protected]>
Cc: Tim Harvey <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
V2: Rebase on u-boot/next with additional clock patches
---
 drivers/clk/clk-fixed-factor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index ff61fb4d706..4eb8be728e6 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -56,7 +56,7 @@ struct clk *clk_hw_register_fixed_factor(struct udevice *dev,
        clk->flags = flags;
 
        ret = clk_register(clk, UBOOT_DM_CLK_IMX_FIXED_FACTOR, name,
-                          parent_name);
+                          clk_resolve_parent_clk(dev, parent_name));
        if (ret) {
                kfree(fix);
                return ERR_PTR(ret);
-- 
2.47.2

Reply via email to