clk: ti: Preserve node in ti_dt_clocks_register()
[ Upstream commit 80864594ff2ad002e2755daf97d46ff0c86faf1f ] In preparation for making use of the clock-output-names, we want to keep node around in ti_dt_clocks_register(). This change should not needed as a fix currently. Signed-off-by: Tony Lindgren <tony@atomide.com> Link: https://lore.kernel.org/r/20220204071449.16762-3-tony@atomide.com Signed-off-by: Stephen Boyd <sboyd@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
a2a0e04f64
commit
1e9b5538cf
@@ -131,7 +131,7 @@ int ti_clk_setup_ll_ops(struct ti_clk_ll_ops *ops)
|
|||||||
void __init ti_dt_clocks_register(struct ti_dt_clk oclks[])
|
void __init ti_dt_clocks_register(struct ti_dt_clk oclks[])
|
||||||
{
|
{
|
||||||
struct ti_dt_clk *c;
|
struct ti_dt_clk *c;
|
||||||
struct device_node *node, *parent;
|
struct device_node *node, *parent, *child;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
struct of_phandle_args clkspec;
|
struct of_phandle_args clkspec;
|
||||||
char buf[64];
|
char buf[64];
|
||||||
@@ -171,10 +171,13 @@ void __init ti_dt_clocks_register(struct ti_dt_clk oclks[])
|
|||||||
node = of_find_node_by_name(NULL, buf);
|
node = of_find_node_by_name(NULL, buf);
|
||||||
if (num_args && compat_mode) {
|
if (num_args && compat_mode) {
|
||||||
parent = node;
|
parent = node;
|
||||||
node = of_get_child_by_name(parent, "clock");
|
child = of_get_child_by_name(parent, "clock");
|
||||||
if (!node)
|
if (!child)
|
||||||
node = of_get_child_by_name(parent, "clk");
|
child = of_get_child_by_name(parent, "clk");
|
||||||
|
if (child) {
|
||||||
of_node_put(parent);
|
of_node_put(parent);
|
||||||
|
node = child;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
clkspec.np = node;
|
clkspec.np = node;
|
||||||
|
Reference in New Issue
Block a user