From: Laurent Pinchart Date: Thu, 22 May 2014 18:02:14 +0000 (+0200) Subject: clk: shmobile: mstp: Fix the is_enabled() operation X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bb178da701382a230e26d90cf94e8a24b280e0d9;p=linux-beck.git clk: shmobile: mstp: Fix the is_enabled() operation 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 Signed-off-by: Geert Uytterhoeven Signed-off-by: Mike Turquette --- diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c index 1f6324e29a80..2d2fe773ac81 100644 --- a/drivers/clk/shmobile/clk-mstp.c +++ b/drivers/clk/shmobile/clk-mstp.c @@ -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 = {