omap: gpio: fix incorrect matching of IRQ_TYPE_EDGE_BOTH
authorJanusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Mon, 5 Apr 2010 11:38:06 +0000 (11:38 +0000)
committerTony Lindgren <tony@atomide.com>
Fri, 23 Apr 2010 00:32:36 +0000 (17:32 -0700)
commit29501577a7f3c925d5273064752ce3dc356ccfad
tree051740fab9d402fd9455c6a69d816dabe0a39224
parent46cdc4e431536c279b1ce00520d6fe6e9ca42b04
omap: gpio: fix incorrect matching of IRQ_TYPE_EDGE_BOTH

Since IRQ_TYPE_EDGE_BOTH is defined as (IRQ_TYPE_EDGE_FALLING |
IRQ_TYPE_EDGE_RISING), testing against it with a bitwise AND also matches
both single-edge cases in addition to the intended both edges case. Fix it,
replacing with a more accurate expression.

Created and tested againts linux-2.6.34-rc3.
Applicable to 2.6.33-stable as well.

Signed-off-by: Janusz Krzysztofik <jkrzyszt@tis.icnet.pl>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/plat-omap/gpio.c