]> git.karo-electronics.de Git - linux-beck.git/commitdiff
clk: shmobile: mstp: Fix the is_enabled() operation
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Thu, 22 May 2014 18:02:14 +0000 (20:02 +0200)
committerMike Turquette <mturquette@linaro.org>
Fri, 23 May 2014 02:03:03 +0000 (19:03 -0700)
The MSTP[SC]R registers have clock stop bits, not clock enable bits. The
bit value should thus be inverted in the is_enabled() operation.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
drivers/clk/shmobile/clk-mstp.c

index 1f6324e29a8099b09930f26234c703d7973be686..2d2fe773ac8168f9f458f0c681b33937738943b4 100644 (file)
@@ -112,7 +112,7 @@ static int cpg_mstp_clock_is_enabled(struct clk_hw *hw)
        else
                value = clk_readl(group->smstpcr);
 
-       return !!(value & BIT(clock->bit_index));
+       return !(value & BIT(clock->bit_index));
 }
 
 static const struct clk_ops cpg_mstp_clock_ops = {