summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-pch.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-04-14 20:49:00 +0300
committerAndy Shevchenko <andriy.shevchenko@linux.intel.com>2020-04-16 20:40:14 +0300
commit5376b0b31295364f3a166ee82f1a7d893bcbf8e9 (patch)
treee9378be837b77f9d1ddf3be56d235cd760033f57 /drivers/gpio/gpio-pch.c
parent368b8436011ac5138230b98bb34923b7f77ae533 (diff)
gpio: pch: Use in pch_irq_type() macros provided by IRQ core
Use in pch_irq_type() the macros provided by IRQ core for IRQ type. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'drivers/gpio/gpio-pch.c')
-rw-r--r--drivers/gpio/gpio-pch.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-pch.c b/drivers/gpio/gpio-pch.c
index 9c34230f2e84..e96d28bf43b4 100644
--- a/drivers/gpio/gpio-pch.c
+++ b/drivers/gpio/gpio-pch.c
@@ -265,9 +265,9 @@ static int pch_irq_type(struct irq_data *d, unsigned int type)
iowrite32(im | (val << (im_pos * 4)), im_reg);
/* And the handler */
- if (type & (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH))
+ if (type & IRQ_TYPE_LEVEL_MASK)
irq_set_handler_locked(d, handle_level_irq);
- else if (type & (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING))
+ else if (type & IRQ_TYPE_EDGE_BOTH)
irq_set_handler_locked(d, handle_edge_irq);
spin_unlock_irqrestore(&chip->spinlock, flags);