From 1a7dddf088814304752977000b44c5ea546dd162 Mon Sep 17 00:00:00 2001 From: Martin Fuzzey Date: Thu, 22 Nov 2012 20:15:05 +0100 Subject: [PATCH] --- yaml --- r: 336512 b: refs/heads/master c: 1f61e5f143b578606389887887af549bc5554353 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/clk/clk.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 50cd023f03f2..0eb842421dbf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 45228ef32240957b1536fbba1ca12377cb2e587c +refs/heads/master: 1f61e5f143b578606389887887af549bc5554353 diff --git a/trunk/drivers/clk/clk.c b/trunk/drivers/clk/clk.c index 2fd28ddd06c9..9955ad7e786e 100644 --- a/trunk/drivers/clk/clk.c +++ b/trunk/drivers/clk/clk.c @@ -1298,12 +1298,20 @@ int __clk_init(struct device *dev, struct clk *clk) * walk the list of orphan clocks and reparent any that are children of * this clock */ - hlist_for_each_entry_safe(orphan, tmp, tmp2, &clk_orphan_list, child_node) + hlist_for_each_entry_safe(orphan, tmp, tmp2, &clk_orphan_list, child_node) { + if (orphan->ops->get_parent) { + i = orphan->ops->get_parent(orphan->hw); + if (!strcmp(clk->name, orphan->parent_names[i])) + __clk_reparent(orphan, clk); + continue; + } + for (i = 0; i < orphan->num_parents; i++) if (!strcmp(clk->name, orphan->parent_names[i])) { __clk_reparent(orphan, clk); break; } + } /* * optional platform-specific magic