summaryrefslogtreecommitdiffstats
path: root/drivers/clk/clk.c
diff options
context:
space:
mode:
authorStephen Boyd2015-05-07 02:00:54 +0200
committerStephen Boyd2015-05-07 20:32:54 +0200
commita63347251907d7f9fc2fc02e3b9898efda573c05 (patch)
tree7ba9c5fbc3d328d0457469ada3988056bb42b3a6 /drivers/clk/clk.c
parentMerge branch 'clk-fixes' into clk-next (diff)
downloadkernel-qcow2-linux-a63347251907d7f9fc2fc02e3b9898efda573c05.tar.gz
kernel-qcow2-linux-a63347251907d7f9fc2fc02e3b9898efda573c05.tar.xz
kernel-qcow2-linux-a63347251907d7f9fc2fc02e3b9898efda573c05.zip
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: Stephen Boyd <sboyd@codeaurora.org>
Diffstat (limited to 'drivers/clk/clk.c')
-rw-r--r--drivers/clk/clk.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 9e9d18cadeee..659f2b036cf5 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -543,6 +543,8 @@ EXPORT_SYMBOL_GPL(__clk_mux_determine_rate_closest);
static void clk_core_unprepare(struct clk_core *core)
{
+ lockdep_assert_held(&prepare_lock);
+
if (!core)
return;
@@ -589,6 +591,8 @@ static int clk_core_prepare(struct clk_core *core)
{
int ret = 0;
+ lockdep_assert_held(&prepare_lock);
+
if (!core)
return 0;
@@ -644,6 +648,8 @@ EXPORT_SYMBOL_GPL(clk_prepare);
static void clk_core_disable(struct clk_core *core)
{
+ lockdep_assert_held(&enable_lock);
+
if (!core)
return;
@@ -692,6 +698,8 @@ static int clk_core_enable(struct clk_core *core)
{
int ret = 0;
+ lockdep_assert_held(&enable_lock);
+
if (!core)
return 0;