summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-bcm-kona.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-09-20 23:14:18 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-09-20 23:29:52 +0200
commit1dc94272117e35c1618516ffe5b129a7663c1d03 (patch)
tree4e11c1561de291d40b3465a14a65da8ceffc7540 /drivers/gpio/gpio-bcm-kona.c
parentgpio: ucb1400: Can be built as a module (diff)
downloadlinux-1dc94272117e35c1618516ffe5b129a7663c1d03.tar.xz
linux-1dc94272117e35c1618516ffe5b129a7663c1d03.zip
gpio: bcm-kona: only use set_irq_flags() on ARM
As per the pattern from other GPIO drivers, use set_irq_flags() on ARM only, use irq_set_noprobe() on other archs. Also rename the argument "virq" to just "irq", this IRQ isn't any more "virtual" than any other Linux IRQ number, we use "hwirq" for the actual hw-numbers, "virq" is just bogus. Reviewed-by: Markus Mayer <mmayer@broadcom.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-bcm-kona.c')
-rw-r--r--drivers/gpio/gpio-bcm-kona.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index f7d932ac64e6..c0751a8c2dee 100644
--- a/drivers/gpio/gpio-bcm-kona.c
+++ b/drivers/gpio/gpio-bcm-kona.c
@@ -468,18 +468,22 @@ MODULE_DEVICE_TABLE(of, bcm_kona_gpio_of_match);
*/
static struct lock_class_key gpio_lock_class;
-static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int virq,
+static int bcm_kona_gpio_irq_map(struct irq_domain *d, unsigned int irq,
irq_hw_number_t hwirq)
{
int ret;
- ret = irq_set_chip_data(virq, d->host_data);
+ ret = irq_set_chip_data(irq, d->host_data);
if (ret < 0)
return ret;
- irq_set_lockdep_class(virq, &gpio_lock_class);
- irq_set_chip_and_handler(virq, &bcm_gpio_irq_chip, handle_simple_irq);
- irq_set_nested_thread(virq, 1);
- set_irq_flags(virq, IRQF_VALID);
+ irq_set_lockdep_class(irq, &gpio_lock_class);
+ irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip, handle_simple_irq);
+ irq_set_nested_thread(irq, 1);
+#ifdef CONFIG_ARM
+ set_irq_flags(irq, IRQF_VALID);
+#else
+ irq_set_noprobe(irq);
+#endif
return 0;
}
@@ -598,7 +602,11 @@ static int bcm_kona_gpio_probe(struct platform_device *pdev)
irq_set_lockdep_class(irq, &gpio_lock_class);
irq_set_chip_and_handler(irq, &bcm_gpio_irq_chip,
handle_simple_irq);
+#ifdef CONFIG_ARM
set_irq_flags(irq, IRQF_VALID);
+#else
+ irq_set_noprobe(irq);
+#endif
}
for (i = 0; i < kona_gpio->num_bank; i++) {
bank = &kona_gpio->banks[i];