diff options
author | Andy Shevchenko <[email protected]> | 2020-04-15 17:15:28 +0300 |
---|---|---|
committer | Linus Walleij <[email protected]> | 2020-04-17 12:30:06 +0200 |
commit | d31275a9dc0baa6b084917f8d42f1e197239fe6c (patch) | |
tree | 42d4b4d9b31b274bd500196c9ef26fa45efb4394 | |
parent | 9826bbe1fef0b5a2432acce0292562891b1feb57 (diff) |
gpio: dwapb: Convert to use IRQ core provided macros
IRQ core provides macros such as IRQ_RETVAL().
Convert code to use them.
Signed-off-by: Andy Shevchenko <[email protected]>
Tested-by: Serge Semin <[email protected]>
Reviewed-by: Serge Semin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Linus Walleij <[email protected]>
-rw-r--r-- | drivers/gpio/gpio-dwapb.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index 8b30ded9322a..4edac592c253 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c @@ -258,8 +258,7 @@ static int dwapb_irq_set_type(struct irq_data *d, u32 type) irq_hw_number_t bit = irqd_to_hwirq(d); unsigned long level, polarity, flags; - if (type & ~(IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING | - IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW)) + if (type & ~IRQ_TYPE_SENSE_MASK) return -EINVAL; spin_lock_irqsave(&gc->bgpio_lock, flags); @@ -351,12 +350,7 @@ static int dwapb_gpio_set_config(struct gpio_chip *gc, unsigned offset, static irqreturn_t dwapb_irq_handler_mfd(int irq, void *dev_id) { - u32 worked; - struct dwapb_gpio *gpio = dev_id; - - worked = dwapb_do_irq(gpio); - - return worked ? IRQ_HANDLED : IRQ_NONE; + return IRQ_RETVAL(dwapb_do_irq(dev_id)); } static void dwapb_configure_irqs(struct dwapb_gpio *gpio, |