]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
irqchip: Return -EPERM for reserved IRQs
authorGrant Likely <grant.likely@linaro.org>
Thu, 6 Jun 2013 13:11:38 +0000 (14:11 +0100)
committerGrant Likely <grant.likely@linaro.org>
Sat, 8 Jun 2013 20:34:16 +0000 (21:34 +0100)
The irqdomain core will report a log message for any attempted map call
that fails unless the error code is -EPERM. This patch changes the
Versatile irq controller drivers to use -EPERM because it is normal for
a subset of the IRQ inputs to be marked as reserved on the various
Versatile platforms.

Signed-off-by: Grant Likely <grant.likely@linaro.org>
drivers/irqchip/irq-versatile-fpga.c
drivers/irqchip/irq-vic.c

index 065b7a31a47833a3cbe444f3e8779611ca2ede3a..47a52ab580d863ba2266d26f228befc2695218f1 100644 (file)
@@ -119,7 +119,7 @@ static int fpga_irqdomain_map(struct irq_domain *d, unsigned int irq,
 
        /* Skip invalid IRQs, only register handlers for the real ones */
        if (!(f->valid & BIT(hwirq)))
-               return -ENOTSUPP;
+               return -EPERM;
        irq_set_chip_data(irq, f);
        irq_set_chip_and_handler(irq, &f->chip,
                                handle_level_irq);
index 884d11c7355fb5d5cc0636c25b06e1ba1b856ef5..2bbb00404cf5001df2c6f8654de6d467d58f3b6d 100644 (file)
@@ -197,7 +197,7 @@ static int vic_irqdomain_map(struct irq_domain *d, unsigned int irq,
 
        /* Skip invalid IRQs, only register handlers for the real ones */
        if (!(v->valid_sources & (1 << hwirq)))
-               return -ENOTSUPP;
+               return -EPERM;
        irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
        irq_set_chip_data(irq, v->base);
        set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);