diff mbox

[RFC,V1,1/8] clk: support static parent

Message ID 1322046755-13511-2-git-send-email-richard.zhao@linaro.org
State RFC
Headers show

Commit Message

Richard Zhao Nov. 23, 2011, 11:12 a.m. UTC
Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
---
 drivers/clk/clk.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 85dabdb31..ed557c9 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -519,13 +519,11 @@  void clk_init(struct device *dev, struct clk *clk)
 
 	mutex_lock(&prepare_lock);
 
-	if (clk->ops->get_parent) {
+	if (clk->ops->get_parent)
 		clk->parent = clk->ops->get_parent(clk);
-		if (clk->parent)
-			hlist_add_head(&clk->child_node,
-					&clk->parent->children);
-	} else
-		clk->parent = NULL;
+	if (clk->parent)
+		hlist_add_head(&clk->child_node,
+				&clk->parent->children);
 
 	if (clk->ops->recalc_rate)
 		clk->rate = clk->ops->recalc_rate(clk);