clk: clk-gate: Resolve parent clock by name
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 <marex@denx.de>
This commit is contained in:

committed by
Fabio Estevam

parent
aee51ad0d9
commit
742e0205d1
@@ -149,7 +149,8 @@ struct clk *clk_register_gate(struct udevice *dev, const char *name,
|
||||
clk = &gate->clk;
|
||||
clk->flags = flags;
|
||||
|
||||
ret = clk_register(clk, UBOOT_DM_CLK_GATE, name, parent_name);
|
||||
ret = clk_register(clk, UBOOT_DM_CLK_GATE, name,
|
||||
clk_resolve_parent_clk(dev, parent_name));
|
||||
if (ret) {
|
||||
kfree(gate);
|
||||
return ERR_PTR(ret);
|
||||
|
Reference in New Issue
Block a user