linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] pinctrl: at91-pio4: Use irq_set_handler_locked()
@ 2015-10-02 13:50 Nicolas Ferre
  2015-10-02 13:50 ` [PATCH 2/2] pinctrl: at91-pio4: Adapt to new irq flow handler prototype Nicolas Ferre
  2015-10-02 13:57 ` [PATCH 1/2] pinctrl: at91-pio4: Use irq_set_handler_locked() Nicolas Ferre
  0 siblings, 2 replies; 5+ messages in thread
From: Nicolas Ferre @ 2015-10-02 13:50 UTC (permalink / raw)
  To: Ludovic Desroches, linus.walleij, linux-arm-kernel
  Cc: linux-kernel, linux-gpio, s.hauer, alexandre.belloni,
	Nicolas Ferre

Use irq_set_handler_locked() as it avoids a redundant lookup of the irq
descriptor.
This adaptation landed on the pinctrl-at91.c driver while this one was being
developped: synchronize with this enhancement and avoid the following
compilation error:

../drivers/pinctrl/pinctrl-at91-pio4.c: In function 'atmel_gpio_irq_set_type':
../drivers/pinctrl/pinctrl-at91-pio4.c:173:3: error: implicit declaration of
function '__irq_set_handler_locked' [-Werror=implicit-function-declaration]
   __irq_set_handler_locked(d->irq, handle_edge_irq);
      ^

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 drivers/pinctrl/pinctrl-at91-pio4.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/pinctrl/pinctrl-at91-pio4.c b/drivers/pinctrl/pinctrl-at91-pio4.c
index 5e2189f17fe1..1f1a64ef3559 100644
--- a/drivers/pinctrl/pinctrl-at91-pio4.c
+++ b/drivers/pinctrl/pinctrl-at91-pio4.c
@@ -170,23 +170,23 @@ static int atmel_gpio_irq_set_type(struct irq_data *d, unsigned type)
 
 	switch (type) {
 	case IRQ_TYPE_EDGE_RISING:
-		__irq_set_handler_locked(d->irq, handle_edge_irq);
+		irq_set_handler_locked(d, handle_edge_irq);
 		reg |= ATMEL_PIO_CFGR_EVTSEL_RISING;
 		break;
 	case IRQ_TYPE_EDGE_FALLING:
-		__irq_set_handler_locked(d->irq, handle_edge_irq);
+		irq_set_handler_locked(d, handle_edge_irq);
 		reg |= ATMEL_PIO_CFGR_EVTSEL_FALLING;
 		break;
 	case IRQ_TYPE_EDGE_BOTH:
-		__irq_set_handler_locked(d->irq, handle_edge_irq);
+		irq_set_handler_locked(d, handle_edge_irq);
 		reg |= ATMEL_PIO_CFGR_EVTSEL_BOTH;
 		break;
 	case IRQ_TYPE_LEVEL_LOW:
-		__irq_set_handler_locked(d->irq, handle_level_irq);
+		irq_set_handler_locked(d, handle_level_irq);
 		reg |= ATMEL_PIO_CFGR_EVTSEL_LOW;
 		break;
 	case IRQ_TYPE_LEVEL_HIGH:
-		__irq_set_handler_locked(d->irq, handle_level_irq);
+		irq_set_handler_locked(d, handle_level_irq);
 		reg |= ATMEL_PIO_CFGR_EVTSEL_HIGH;
 		break;
 	case IRQ_TYPE_NONE:
-- 
2.1.3


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

end of thread, other threads:[~2015-10-05 10:10 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-02 13:50 [PATCH 1/2] pinctrl: at91-pio4: Use irq_set_handler_locked() Nicolas Ferre
2015-10-02 13:50 ` [PATCH 2/2] pinctrl: at91-pio4: Adapt to new irq flow handler prototype Nicolas Ferre
2015-10-02 13:57 ` [PATCH 1/2] pinctrl: at91-pio4: Use irq_set_handler_locked() Nicolas Ferre
2015-10-04 21:31   ` Nicolas Ferre
2015-10-05 10:09   ` Ludovic Desroches

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).