Commit b986055d authored by Herve Codina's avatar Herve Codina Committed by Thomas Gleixner

irqdomain: Use irq_domain_instantiate() for hierarchy domain creation

irq_domain_instantiate() handles all needs to be used in
irq_domain_create_hierarchy()

Avoid code duplication and use directly irq_domain_instantiate() for
hierarchy domain creation.
Signed-off-by: default avatarHerve Codina <herve.codina@bootlin.com>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240614173232.1184015-10-herve.codina@bootlin.com
parent 419e3778
...@@ -1213,23 +1213,16 @@ struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, ...@@ -1213,23 +1213,16 @@ struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent,
.hwirq_max = size, .hwirq_max = size,
.ops = ops, .ops = ops,
.host_data = host_data, .host_data = host_data,
.domain_flags = flags,
.parent = parent,
}; };
struct irq_domain *domain; struct irq_domain *d;
if (!info.size) if (!info.size)
info.hwirq_max = ~0U; info.hwirq_max = ~0U;
domain = __irq_domain_create(&info); d = irq_domain_instantiate(&info);
if (domain) { return IS_ERR(d) ? NULL : d;
if (parent)
domain->root = parent->root;
domain->parent = parent;
domain->flags |= flags;
__irq_domain_publish(domain);
}
return domain;
} }
EXPORT_SYMBOL_GPL(irq_domain_create_hierarchy); EXPORT_SYMBOL_GPL(irq_domain_create_hierarchy);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment