summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-pcf857x.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-09-18 13:12:29 +0200
committerLinus Walleij <linus.walleij@linaro.org>2013-09-18 15:52:17 +0200
commitc27769ef6e118d355922d9c4a530b9d68405b39b (patch)
tree9b73af5ff936950c245da052f033db553156c5cc /drivers/gpio/gpio-pcf857x.c
parentgpiolib-acpi: convert acpi_evaluate_object() to acpi_execute_simple_method() (diff)
downloadlinux-c27769ef6e118d355922d9c4a530b9d68405b39b.tar.xz
linux-c27769ef6e118d355922d9c4a530b9d68405b39b.zip
gpio: pcf857x: 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. Cc: George Cherian <george.cherian@ti.com> Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-pcf857x.c')
-rw-r--r--drivers/gpio/gpio-pcf857x.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-pcf857x.c b/drivers/gpio/gpio-pcf857x.c
index 815944db37bf..54725a632660 100644
--- a/drivers/gpio/gpio-pcf857x.c
+++ b/drivers/gpio/gpio-pcf857x.c
@@ -195,15 +195,19 @@ static irqreturn_t pcf857x_irq(int irq, void *data)
return IRQ_HANDLED;
}
-static int pcf857x_irq_domain_map(struct irq_domain *domain, unsigned int virq,
+static int pcf857x_irq_domain_map(struct irq_domain *domain, unsigned int irq,
irq_hw_number_t hw)
{
struct pcf857x *gpio = domain->host_data;
- irq_set_chip_and_handler(virq,
+ irq_set_chip_and_handler(irq,
&dummy_irq_chip,
handle_level_irq);
- set_irq_flags(virq, IRQF_VALID);
+#ifdef CONFIG_ARM
+ set_irq_flags(irq, IRQF_VALID);
+#else
+ irq_set_noprobe(irq);
+#endif
gpio->irq_mapped |= (1 << hw);
return 0;