Commit a6334725 authored by Stephen Boyd's avatar Stephen Boyd

clk: Add some more lockdep assertions

We don't check to make sure the enable_lock is held across
enable/disable and we don't check if the prepare_lock is held
across prepare/unprepare. Add some asserts to catch any future
locking problems.
Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
parent 18e70efe
...@@ -543,6 +543,8 @@ EXPORT_SYMBOL_GPL(__clk_mux_determine_rate_closest); ...@@ -543,6 +543,8 @@ EXPORT_SYMBOL_GPL(__clk_mux_determine_rate_closest);
static void clk_core_unprepare(struct clk_core *core) static void clk_core_unprepare(struct clk_core *core)
{ {
lockdep_assert_held(&prepare_lock);
if (!core) if (!core)
return; return;
...@@ -589,6 +591,8 @@ static int clk_core_prepare(struct clk_core *core) ...@@ -589,6 +591,8 @@ static int clk_core_prepare(struct clk_core *core)
{ {
int ret = 0; int ret = 0;
lockdep_assert_held(&prepare_lock);
if (!core) if (!core)
return 0; return 0;
...@@ -644,6 +648,8 @@ EXPORT_SYMBOL_GPL(clk_prepare); ...@@ -644,6 +648,8 @@ EXPORT_SYMBOL_GPL(clk_prepare);
static void clk_core_disable(struct clk_core *core) static void clk_core_disable(struct clk_core *core)
{ {
lockdep_assert_held(&enable_lock);
if (!core) if (!core)
return; return;
...@@ -692,6 +698,8 @@ static int clk_core_enable(struct clk_core *core) ...@@ -692,6 +698,8 @@ static int clk_core_enable(struct clk_core *core)
{ {
int ret = 0; int ret = 0;
lockdep_assert_held(&enable_lock);
if (!core) if (!core)
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment