[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1455225554-13267-3-git-send-email-mturquette@baylibre.com>
Date: Thu, 11 Feb 2016 13:19:10 -0800
From: Michael Turquette <mturquette@...libre.com>
To: linux-clk@...r.kernel.org
Cc: lee.jones@...aro.org, sboyd@...eaurora.org,
maxime.ripard@...e-electrons.com, maxime.coquelin@...com,
geert@...ux-m68k.org, heiko@...ech.de, andre.przywara@....com,
rklein@...dia.com, linux-kernel@...r.kernel.org,
Michael Turquette <mturquette@...libre.com>
Subject: [PATCH v42 2/6] clk: WARN_ON about to disable a critical clock
From: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Lee Jones <lee.jones@...aro.org>
Signed-off-by: Michael Turquette <mturquette@...libre.com>
---
drivers/clk/clk.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 993f775..39f9527 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;
--
2.1.4
Powered by blists - more mailing lists