clk: qcom: Fix clk_rcg2_is_enabled() check
authorStephen Boyd <sboyd@codeaurora.org>
Fri, 16 May 2014 23:07:08 +0000 (16:07 -0700)
committerMike Turquette <mturquette@linaro.org>
Thu, 29 May 2014 16:30:20 +0000 (09:30 -0700)
If the bit is set the clock is off so we should be checking for
a clear bit, not a set bit. Invert the logic.

Fixes: bcd61c0f535a (clk: qcom: Add support for root clock generators (RCGs))
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/qcom/clk-rcg2.c

index 00f878a04d3f4847007101bc6a5c97ff5c2c060e..0996a3a398550f36acdfc2320d70e64075e2afe5 100644 (file)
@@ -55,7 +55,7 @@ static int clk_rcg2_is_enabled(struct clk_hw *hw)
        if (ret)
                return ret;
 
-       return (cmd & CMD_ROOT_OFF) != 0;
+       return (cmd & CMD_ROOT_OFF) == 0;
 }
 
 static u8 clk_rcg2_get_parent(struct clk_hw *hw)