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 <andriy.shevchenko@linux.intel.com> Tested-by: Serge Semin <fancer.lancer@gmail.com> Reviewed-by: Serge Semin <fancer.lancer@gmail.com> Link: https://lore.kernel.org/r/20200415141534.31240-9-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
9826bbe1fe
commit
d31275a9dc
|
@ -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);
|
irq_hw_number_t bit = irqd_to_hwirq(d);
|
||||||
unsigned long level, polarity, flags;
|
unsigned long level, polarity, flags;
|
||||||
|
|
||||||
if (type & ~(IRQ_TYPE_EDGE_RISING | IRQ_TYPE_EDGE_FALLING |
|
if (type & ~IRQ_TYPE_SENSE_MASK)
|
||||||
IRQ_TYPE_LEVEL_HIGH | IRQ_TYPE_LEVEL_LOW))
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
spin_lock_irqsave(&gc->bgpio_lock, flags);
|
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)
|
static irqreturn_t dwapb_irq_handler_mfd(int irq, void *dev_id)
|
||||||
{
|
{
|
||||||
u32 worked;
|
return IRQ_RETVAL(dwapb_do_irq(dev_id));
|
||||||
struct dwapb_gpio *gpio = dev_id;
|
|
||||||
|
|
||||||
worked = dwapb_do_irq(gpio);
|
|
||||||
|
|
||||||
return worked ? IRQ_HANDLED : IRQ_NONE;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dwapb_configure_irqs(struct dwapb_gpio *gpio,
|
static void dwapb_configure_irqs(struct dwapb_gpio *gpio,
|
||||||
|
|
Loading…
Reference in New Issue