linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/2] gpio: dwapb: Drop redundant check in dwapb_irq_set_type()
@ 2021-06-01 16:21 Andy Shevchenko
  2021-06-01 16:21 ` [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get() Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andy Shevchenko @ 2021-06-01 16:21 UTC (permalink / raw)
  To: Andy Shevchenko, Serge Semin, linux-gpio, linux-kernel
  Cc: Hoan Tran, Serge Semin, Linus Walleij, Bartosz Golaszewski

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 <andriy.shevchenko@linux.intel.com>
---
 drivers/gpio/gpio-dwapb.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/gpio/gpio-dwapb.c b/drivers/gpio/gpio-dwapb.c
index d3233cc4b76b..939701c1465e 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);
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-06-02 15:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-01 16:21 [PATCH v1 1/2] gpio: dwapb: Drop redundant check in dwapb_irq_set_type() Andy Shevchenko
2021-06-01 16:21 ` [PATCH v1 2/2] gpio: dwapb: Switch to use fwnode_irq_get() Andy Shevchenko
2021-06-02 13:35   ` Bartosz Golaszewski
2021-06-02 14:05   ` Serge Semin
2021-06-02 15:41     ` Andy Shevchenko
2021-06-02 13:34 ` [PATCH v1 1/2] gpio: dwapb: Drop redundant check in dwapb_irq_set_type() Bartosz Golaszewski
2021-06-02 14:07 ` Serge Semin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).