pinctrl/samsung: Use irq_set_handler_locked()
authorThomas Gleixner <tglx@linutronix.de>
Tue, 23 Jun 2015 13:52:57 +0000 (15:52 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Fri, 17 Jul 2015 19:56:20 +0000 (21:56 +0200)
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-gpio@vger.kernel.org
drivers/pinctrl/samsung/pinctrl-s3c24xx.c
drivers/pinctrl/samsung/pinctrl-s3c64xx.c

index 01b43dbfb795b04eea99111a0d273ff70242e884..7a77eae60b83308bc54ecd5f181b08550fe9701e 100644 (file)
@@ -131,13 +131,13 @@ static int s3c24xx_eint_get_trigger(unsigned int type)
        }
 }
 
-static void s3c24xx_eint_set_handler(unsigned int irq, unsigned int type)
+static void s3c24xx_eint_set_handler(struct irq_data *d, unsigned int type)
 {
        /* Edge- and level-triggered interrupts need different handlers */
        if (type & IRQ_TYPE_EDGE_BOTH)
-               __irq_set_handler_locked(irq, handle_edge_irq);
+               irq_set_handler_locked(d, handle_edge_irq);
        else
-               __irq_set_handler_locked(irq, handle_level_irq);
+               irq_set_handler_locked(d, handle_level_irq);
 }
 
 static void s3c24xx_eint_set_function(struct samsung_pinctrl_drv_data *d,
@@ -181,7 +181,7 @@ static int s3c24xx_eint_type(struct irq_data *data, unsigned int type)
                return -EINVAL;
        }
 
-       s3c24xx_eint_set_handler(data->irq, type);
+       s3c24xx_eint_set_handler(data, type);
 
        /* Set up interrupt trigger */
        reg = d->virt_base + EINT_REG(index);
index ec8cc3b476213c4161faada14acf20bc3d1a9725..41050f4c67dc078289bd8ec96071d38af82ec9c6 100644 (file)
@@ -260,13 +260,13 @@ static int s3c64xx_irq_get_trigger(unsigned int type)
        return trigger;
 }
 
-static void s3c64xx_irq_set_handler(unsigned int irq, unsigned int type)
+static void s3c64xx_irq_set_handler(struct irq_data *d, unsigned int type)
 {
        /* Edge- and level-triggered interrupts need different handlers */
        if (type & IRQ_TYPE_EDGE_BOTH)
-               __irq_set_handler_locked(irq, handle_edge_irq);
+               irq_set_handler_locked(d, handle_edge_irq);
        else
-               __irq_set_handler_locked(irq, handle_level_irq);
+               irq_set_handler_locked(d, handle_level_irq);
 }
 
 static void s3c64xx_irq_set_function(struct samsung_pinctrl_drv_data *d,
@@ -356,7 +356,7 @@ static int s3c64xx_gpio_irq_set_type(struct irq_data *irqd, unsigned int type)
                return -EINVAL;
        }
 
-       s3c64xx_irq_set_handler(irqd->irq, type);
+       s3c64xx_irq_set_handler(irqd, type);
 
        /* Set up interrupt trigger */
        reg = d->virt_base + EINTCON_REG(bank->eint_offset);
@@ -567,7 +567,7 @@ static int s3c64xx_eint0_irq_set_type(struct irq_data *irqd, unsigned int type)
                return -EINVAL;
        }
 
-       s3c64xx_irq_set_handler(irqd->irq, type);
+       s3c64xx_irq_set_handler(irqd, type);
 
        /* Set up interrupt trigger */
        reg = d->virt_base + EINT0CON0_REG;