浏览代码

irqchip: Return -EPERM for reserved IRQs

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>
Grant Likely 12 年之前
父节点
当前提交
d94ea3f6d2
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      drivers/irqchip/irq-versatile-fpga.c
  2. 1 1
      drivers/irqchip/irq-vic.c

+ 1 - 1
drivers/irqchip/irq-versatile-fpga.c

@@ -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 */
 	/* Skip invalid IRQs, only register handlers for the real ones */
 	if (!(f->valid & BIT(hwirq)))
 	if (!(f->valid & BIT(hwirq)))
-		return -ENOTSUPP;
+		return -EPERM;
 	irq_set_chip_data(irq, f);
 	irq_set_chip_data(irq, f);
 	irq_set_chip_and_handler(irq, &f->chip,
 	irq_set_chip_and_handler(irq, &f->chip,
 				handle_level_irq);
 				handle_level_irq);

+ 1 - 1
drivers/irqchip/irq-vic.c

@@ -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 */
 	/* Skip invalid IRQs, only register handlers for the real ones */
 	if (!(v->valid_sources & (1 << hwirq)))
 	if (!(v->valid_sources & (1 << hwirq)))
-		return -ENOTSUPP;
+		return -EPERM;
 	irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
 	irq_set_chip_and_handler(irq, &vic_chip, handle_level_irq);
 	irq_set_chip_data(irq, v->base);
 	irq_set_chip_data(irq, v->base);
 	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
 	set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);