clk: fix critical clock locking
Changes
1 files changed · +5 −0
| File | Status | Add | Del | Content |
|---|---|---|---|---|
| drivers/clk/clk.c | modified | +5 | −0 | View file |
drivers/clk/clk.c
View filediff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ce39add..d584004 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2404,8 +2404,13 @@ static int __clk_core_init(struct clk_core *core)
core->ops->init(core->hw);
if (core->flags & CLK_IS_CRITICAL) {
+ unsigned long flags;
+
clk_core_prepare(core);
+
+ flags = clk_enable_lock();
clk_core_enable(core);
+ clk_enable_unlock(flags);
}
kref_init(&core->ref);