From: Sascha Hauer Date: Fri, 14 Jan 2011 13:30:03 +0000 (+0100) Subject: ARM i.MX28: fix bit operation X-Git-Tag: MMI-PSA29.97-13-9~20808^2^2^2~8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=13be9f00c33fe69112fe6c755d6a8f3e249abbb2;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git ARM i.MX28: fix bit operation reg | (1 << clk->enable_shift) always evaluates to true. Switch it to & which makes much more sense Signed-off-by: Sascha Hauer Acked-by: Shawn Guo --- diff --git a/arch/arm/mach-mxs/clock-mx28.c b/arch/arm/mach-mxs/clock-mx28.c index 56312c092a9e..4146b38605de 100644 --- a/arch/arm/mach-mxs/clock-mx28.c +++ b/arch/arm/mach-mxs/clock-mx28.c @@ -355,7 +355,7 @@ static int name##_set_rate(struct clk *clk, unsigned long rate) \ } else { \ reg &= ~BM_CLKCTRL_##dr##_DIV; \ reg |= div << BP_CLKCTRL_##dr##_DIV; \ - if (reg | (1 << clk->enable_shift)) { \ + if (reg & (1 << clk->enable_shift)) { \ pr_err("%s: clock is gated\n", __func__); \ return -EINVAL; \ } \