[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20160120182046.GA25463@sophia>
Date: Wed, 20 Jan 2016 13:20:46 -0500
From: William Breathitt Gray <vilhelm.gray@...il.com>
To: linus.walleij@...aro.org, gnurou@...il.com
Cc: linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH] gpio: 104-idio-16: Return IRQ_NONE if all relevant GPIO
lines are masked
If the irq_mask member has a value of 0, then interrupts are disabled on
the device. Therefore, IRQ_NONE should be returned if the irq_mask
member is 0.
Signed-off-by: William Breathitt Gray <vilhelm.gray@...il.com>
---
drivers/gpio/gpio-104-idio-16.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpio/gpio-104-idio-16.c b/drivers/gpio/gpio-104-idio-16.c
index 4d69b50..09fe032 100644
--- a/drivers/gpio/gpio-104-idio-16.c
+++ b/drivers/gpio/gpio-104-idio-16.c
@@ -175,6 +175,9 @@ static irqreturn_t idio_16_irq_handler(int irq, void *dev_id)
struct gpio_chip *const chip = &idio16gpio->chip;
int gpio;
+ if (!idio16gpio->irq_mask)
+ return IRQ_NONE;
+
for_each_set_bit(gpio, &idio16gpio->irq_mask, chip->ngpio)
generic_handle_irq(irq_find_mapping(chip->irqdomain, gpio));
--
2.4.10
Powered by blists - more mailing lists