aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 2fd28ddd06c..9955ad7e786 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -1298,12 +1298,20 @@ int __clk_init(struct device *dev, struct clk *clk)
1298 * walk the list of orphan clocks and reparent any that are children of 1298 * walk the list of orphan clocks and reparent any that are children of
1299 * this clock 1299 * this clock
1300 */ 1300 */
1301 hlist_for_each_entry_safe(orphan, tmp, tmp2, &clk_orphan_list, child_node) 1301 hlist_for_each_entry_safe(orphan, tmp, tmp2, &clk_orphan_list, child_node) {
1302 if (orphan->ops->get_parent) {
1303 i = orphan->ops->get_parent(orphan->hw);
1304 if (!strcmp(clk->name, orphan->parent_names[i]))
1305 __clk_reparent(orphan, clk);
1306 continue;
1307 }
1308
1302 for (i = 0; i < orphan->num_parents; i++) 1309 for (i = 0; i < orphan->num_parents; i++)
1303 if (!strcmp(clk->name, orphan->parent_names[i])) { 1310 if (!strcmp(clk->name, orphan->parent_names[i])) {
1304 __clk_reparent(orphan, clk); 1311 __clk_reparent(orphan, clk);
1305 break; 1312 break;
1306 } 1313 }
1314 }
1307 1315
1308 /* 1316 /*
1309 * optional platform-specific magic 1317 * optional platform-specific magic