[RFC 2/3] clk: Using the "is_enabled" to determine the clock state
Alexander Shiyan
shc_work at mail.ru
Fri Mar 15 02:35:39 EDT 2013
Signed-off-by: Alexander Shiyan <shc_work at mail.ru>
---
drivers/clk/clk.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index cb94755..d5dbbd9 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -213,6 +213,8 @@ int clk_register(struct clk *clk)
if (clk->flags & CLK_ALWAYS_ENABLED) {
clk->enable_count = 1;
+ } else if (clk->ops->is_enabled) {
+ clk->enable_count = clk->ops->is_enabled(clk);
}
return 0;
--
1.7.3.4
More information about the barebox
mailing list