From: Andy Shevchenko Date: Tue, 1 Jun 2021 16:21:27 +0000 (+0300) Subject: gpio: dwapb: Drop redundant check in dwapb_irq_set_type() X-Git-Tag: v5.14-rc1~73^2~19 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5a5bc826fed1d86212eb78114c86808c29b11b0a;p=thirdparty%2Flinux.git gpio: dwapb: Drop redundant check in dwapb_irq_set_type() For more than 15 years we may not get into ->irq_set_type() without any meaningful type provided. Drop redundant check in dwapb_irq_set_type(). See the commit e76de9f8eb67 ("[PATCH] genirq: add SA_TRIGGER support") out of curiosity. Signed-off-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski --- diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c index d3233cc4b76b4..939701c1465e2 100644 --- a/drivers/gpio/gpio-dwapb.c +++ b/drivers/gpio/gpio-dwapb.c @@ -297,9 +297,6 @@ 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_SENSE_MASK) - return -EINVAL; - spin_lock_irqsave(&gc->bgpio_lock, flags); level = dwapb_read(gpio, GPIO_INTTYPE_LEVEL); polarity = dwapb_read(gpio, GPIO_INT_POLARITY);