Message ID | 1322046755-13511-3-git-send-email-richard.zhao@linaro.org |
---|---|
State | RFC |
Headers | show |
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index ed557c9..2d8422f 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -256,6 +256,8 @@ static void clk_recalc_rates(struct clk *clk) if (clk->ops->recalc_rate) clk->rate = clk->ops->recalc_rate(clk); + else if (clk->parent) + clk->rate = clk->parent->rate; if (old_rate == clk->rate) return; @@ -527,6 +529,8 @@ void clk_init(struct device *dev, struct clk *clk) if (clk->ops->recalc_rate) clk->rate = clk->ops->recalc_rate(clk); + else if (clk->parent) + clk->rate = clk->parent->rate; else clk->rate = 0;
Signed-off-by: Richard Zhao <richard.zhao@linaro.org> --- drivers/clk/clk.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)