mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
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
This commit is contained in:
parent
32b9b10961
commit
2e20fbf592
@ -574,6 +574,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;
|
||||
|
||||
@ -679,6 +682,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…
Reference in New Issue
Block a user