Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313433

[PATCH] gpio: 104-idio-16: Return IRQ_NONE if all relevant GPIO lines are masked

From William Breathitt Gray <vilhelm.gray@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] gpio: 104-idio-16: Return IRQ_NONE if all relevant GPIO lines are masked
Date 2016-01-20 19:30 +0100
Message-ID <qT5G2-1Wb-11@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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@gmail.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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] gpio: 104-idio-16: Return IRQ_NONE if all relevant GPIO  lines are masked William Breathitt Gray <vilhelm.gray@gmail.com> - 2016-01-20 19:30 +0100

csiph-web