clk: WARN_ON about to disable a critical clock
Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Michael Turquette <mturquette@baylibre.com> Link: lkml.kernel.org/r/1455225554-13267-3-git-send-email-mturquette@baylibre.com (cherry picked from commit 2e20fbf592621b2c2aeddd82e0fa3dad053cce03) Git-commit: 2e20fbf592621b2c2aeddd82e0fa3dad053cce03 Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git Change-Id: I88418dd25f356402219d7ff36ce791370c69114a Signed-off-by: Taniya Das <tdas@codeaurora.org>
This commit is contained in:
parent
2cb4fc7a17
commit
a2c13a4cc2
1 changed files with 6 additions and 0 deletions
|
@ -825,6 +825,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;
|
||||
|
||||
|
@ -940,6 +943,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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue