diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-14 08:30:03 -0500 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-01-24 03:01:04 -0500 |
commit | 13be9f00c33fe69112fe6c755d6a8f3e249abbb2 (patch) | |
tree | 102a64866c2442ed2b3a75167a8c7e572bea7c86 | |
parent | c56eb8fb6dccb83d9fe62fd4dc00c834de9bc470 (diff) |
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.c | 2 |
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) \ | |||
355 | } else { \ | 355 | } else { \ |
356 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ | 356 | reg &= ~BM_CLKCTRL_##dr##_DIV; \ |
357 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ | 357 | reg |= div << BP_CLKCTRL_##dr##_DIV; \ |
358 | if (reg | (1 << clk->enable_shift)) { \ | 358 | if (reg & (1 << clk->enable_shift)) { \ |
359 | pr_err("%s: clock is gated\n", __func__); \ | 359 | pr_err("%s: clock is gated\n", __func__); \ |
360 | return -EINVAL; \ | 360 | return -EINVAL; \ |
361 | } \ | 361 | } \ |