[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453127331-20616-3-git-send-email-lee.jones@linaro.org>
Date: Mon, 18 Jan 2016 14:28:50 +0000
From: Lee Jones <lee.jones@...aro.org>
To: linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Cc: kernel@...inux.com, maxime.coquelin@...com,
mturquette@...libre.com, sboyd@...eaurora.org,
maxime.ripard@...e-electrons.com, s.hauer@...gutronix.de,
geert@...ux-m68k.org, Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 2/3] clk: WARN_ON about to disable a critical clock
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/clk/clk.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 835cb85..178b364 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -575,6 +575,9 @@ static void clk_core_unprepare(struct clk_core *core)
if (WARN_ON(core->prepare_count == 0))
return;
+ if (WARN_ON(core->prepare_count == 1 && core->flags & CLK_IS_CRITICAL))
+ return;
+
if (--core->prepare_count > 0)
return;
@@ -680,6 +683,9 @@ static void clk_core_disable(struct clk_core *core)
if (WARN_ON(core->enable_count == 0))
return;
+ if (WARN_ON(core->enable_count == 1 && core->flags & CLK_IS_CRITICAL))
+ return;
+
if (--core->enable_count > 0)
return;
--
1.9.1
Powered by blists - more mailing lists