* [PATCH] gpio: bcm-kona: only use set_irq_flags() on ARM
@ 2013-09-20 21:17 Linus Walleij
0 siblings, 0 replies; only message in thread
From: Linus Walleij @ 2013-09-20 21:17 UTC (permalink / raw)
To: linux-gpio; +Cc: Alexandre Courbot, Linus Walleij, Markus Mayer
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.
Cc: Markus Mayer <mmayer@broadcom.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpio/gpio-bcm-kona.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/drivers/gpio/gpio-bcm-kona.c b/drivers/gpio/gpio-bcm-kona.c
index f7d932a..c0997cc 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;
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-20 21:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-20 21:17 [PATCH] gpio: bcm-kona: only use set_irq_flags() on ARM Linus Walleij
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).