lkml.org 
[lkml]   [2016]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 2/3] clk: WARN_ON about to disable a critical clock
Date
Quoting Lee Jones (2016-01-18 06:28:50)
> Signed-off-by: Lee Jones <lee.jones@linaro.org>

Looks good to me.

Regards,
Mike

> ---
> 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
>

\
 
 \ /
  Last update: 2016-02-11 02:01    [W:0.075 / U:0.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site