gpio: gpio_intel_apl: fix if condition leading to dead code

GPIO_INT_ACTIVE_LOW is 0 which means it cannot be simply AND-ed.
So fix the condition.

Fixes #13880

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
This commit is contained in:
Daniel Leung 2019-02-27 15:15:30 -08:00 committed by Andrew Boie
parent ca3b6c680f
commit 1af5fa174b

View file

@ -243,7 +243,7 @@ static int gpio_intel_apl_config(struct device *dev, int access_op,
/* setup interrupt if desired */ /* setup interrupt if desired */
if (flags & GPIO_INT) { if (flags & GPIO_INT) {
/* invert signal for interrupt controller */ /* invert signal for interrupt controller */
if (flags & GPIO_INT_ACTIVE_LOW) { if ((flags & GPIO_INT_ACTIVE_HIGH) == GPIO_INT_ACTIVE_LOW) {
cfg0 |= PAD_CFG0_RXINV; cfg0 |= PAD_CFG0_RXINV;
} }