[PATCH 1/8] irq: choose irq_domain type for generic-chip based on irq_base

Shawn Guo shawn.guo at linaro.org
Sat Feb 11 12:14:25 EST 2012


Choosing irq_domain type for generic-chip based on device_node forces
non-DT users to use legacy irq_domain, which makes no sense, because
linear irq_domain is actually encouraged to be used by both DT and
non-DT users.

The patch changes it to make the decision based on irq_base.  If users
pass in a negative irq_base value, a linear irq_domain will be created,
otherwise a legacy irq_domain will be created.

Signed-off-by: Shawn Guo <shawn.guo at linaro.org>
Cc: Rob Herring <rob.herring at calxeda.com>
Cc: Grant Likely <grant.likely at secretlab.ca>
Cc: Thomas Gleixner <tglx at linutronix.de>
---
 kernel/irq/generic-chip.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/irq/generic-chip.c b/kernel/irq/generic-chip.c
index 3ac7fa1..839f882 100644
--- a/kernel/irq/generic-chip.c
+++ b/kernel/irq/generic-chip.c
@@ -346,7 +346,7 @@ int irq_setup_generic_chip_domain(const char *name, struct device_node *node,
 		irq_setup_generic_chip(gc[i], 0, flags, clr, set);
 	}
 
-	if (node)
+	if ((int) irq_base < 0)
 		d = irq_domain_add_linear(node, hwirq_cnt,
 					  &irq_gc_irq_domain_ops, gc);
 	else
-- 
1.7.5.4




More information about the linux-arm-kernel mailing list