summaryrefslogtreecommitdiff
path: root/drivers/sh/intc/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sh/intc/core.c')
-rw-r--r--drivers/sh/intc/core.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
index 7e562ccb6997..2374468615ed 100644
--- a/drivers/sh/intc/core.c
+++ b/drivers/sh/intc/core.c
@@ -25,6 +25,7 @@
#include <linux/stat.h>
#include <linux/interrupt.h>
#include <linux/sh_intc.h>
+#include <linux/irqdomain.h>
#include <linux/device.h>
#include <linux/syscore_ops.h>
#include <linux/list.h>
@@ -310,6 +311,8 @@ int __init register_intc_controller(struct intc_desc *desc)
BUG_ON(k > 256); /* _INTC_ADDR_E() and _INTC_ADDR_D() are 8 bits */
+ intc_irq_domain_init(d, hw);
+
/* register the vectors one by one */
for (i = 0; i < hw->nr_vectors; i++) {
struct intc_vect *vect = hw->vectors + i;
@@ -319,8 +322,8 @@ int __init register_intc_controller(struct intc_desc *desc)
if (!vect->enum_id)
continue;
- res = irq_alloc_desc_at(irq, numa_node_id());
- if (res != irq && res != -EEXIST) {
+ res = irq_create_identity_mapping(d->domain, irq);
+ if (unlikely(res)) {
pr_err("can't get irq_desc for %d\n", irq);
continue;
}
@@ -340,8 +343,8 @@ int __init register_intc_controller(struct intc_desc *desc)
* IRQ support, each vector still needs to have
* its own backing irq_desc.
*/
- res = irq_alloc_desc_at(irq2, numa_node_id());
- if (res != irq2 && res != -EEXIST) {
+ res = irq_create_identity_mapping(d->domain, irq2);
+ if (unlikely(res)) {
pr_err("can't get irq_desc for %d\n", irq2);
continue;
}