lkml.org 
[lkml]   [2016]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v42 2/6] clk: WARN_ON about to disable a critical clock
    Date
    From: Lee Jones <lee.jones@linaro.org>

    Signed-off-by: Lee Jones <lee.jones@linaro.org>
    Signed-off-by: Michael Turquette <mturquette@baylibre.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
    \
     
     \ /
      Last update: 2016-02-11 22:41    [W:3.357 / U:0.368 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site