forked from Minki/linux
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>
This commit is contained in:
parent
c56eb8fb6d
commit
13be9f00c3
@ -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; \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user