summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2011-01-14 14:30:03 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2011-01-24 09:01:04 +0100
commit13be9f00c33fe69112fe6c755d6a8f3e249abbb2 (patch)
tree102a64866c2442ed2b3a75167a8c7e572bea7c86
parentc56eb8fb6dccb83d9fe62fd4dc00c834de9bc470 (diff)
downloadlinux-stable-13be9f00c33fe69112fe6c755d6a8f3e249abbb2.tar.gz
linux-stable-13be9f00c33fe69112fe6c755d6a8f3e249abbb2.tar.bz2
linux-stable-13be9f00c33fe69112fe6c755d6a8f3e249abbb2.zip
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 <s.hauer@pengutronix.de> Acked-by: Shawn Guo <shawn.guo@freescale.com>
-rw-r--r--arch/arm/mach-mxs/clock-mx28.c2
1 files changed, 1 insertions, 1 deletions
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; \
} \