diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2015-09-22 10:08:13 +0300 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2015-10-02 09:54:35 +0200 |
commit | 4adeabd042422ceecd7605961d785c5c3edab9e1 (patch) | |
tree | ee45979fb4744204a428bf7966647e1f6ffc33aa /drivers/pinctrl/sh-pfc/gpio.c | |
parent | 90d066130f69533fb16b395be3de613903575e69 (diff) | |
download | linux-4adeabd042422ceecd7605961d785c5c3edab9e1.tar.bz2 |
pinctrl: sh-pfc: Remove hardcoded IRQ numbers
Now that all ARM-based Renesas SoCs use multiplatform kernels only the
hardcoded IRQ numbers can be dropped as they're dynamically allocated.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Diffstat (limited to 'drivers/pinctrl/sh-pfc/gpio.c')
-rw-r--r-- | drivers/pinctrl/sh-pfc/gpio.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pinctrl/sh-pfc/gpio.c b/drivers/pinctrl/sh-pfc/gpio.c index a917c62f0712..db3f09aa8993 100644 --- a/drivers/pinctrl/sh-pfc/gpio.c +++ b/drivers/pinctrl/sh-pfc/gpio.c @@ -219,10 +219,7 @@ static int gpio_pin_to_irq(struct gpio_chip *gc, unsigned offset) return -ENOSYS; found: - if (pfc->num_irqs) - return pfc->irqs[i]; - else - return pfc->info->gpio_irq[i].irq; + return pfc->irqs[i]; } static int gpio_pin_setup(struct sh_pfc_chip *chip) @@ -363,7 +360,7 @@ int sh_pfc_register_gpiochip(struct sh_pfc *pfc) return 0; /* If we have IRQ resources make sure their number is correct. */ - if (pfc->num_irqs && pfc->num_irqs != pfc->info->gpio_irq_size) { + if (pfc->num_irqs != pfc->info->gpio_irq_size) { dev_err(pfc->dev, "invalid number of IRQ resources\n"); return -EINVAL; } |