Skip to content

Commit

Permalink
ARM i.MX28: fix bit operation
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Sascha Hauer committed Jan 24, 2011
1 parent c56eb8f commit 13be9f0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm/mach-mxs/clock-mx28.c
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
} \
Expand Down

0 comments on commit 13be9f0

Please sign in to comment.