Skip to content

Commit

Permalink
clk: qcom: Fix clk_rcg2_is_enabled() check
Browse files Browse the repository at this point in the history
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: bcd61c0 (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>
  • Loading branch information
Stephen Boyd authored and Mike Turquette committed May 29, 2014
1 parent 18882ac commit aa01414
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/clk/qcom/clk-rcg2.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit aa01414

Please sign in to comment.