diff options
author | Herve Codina <herve.codina@bootlin.com> | 2024-06-14 19:32:10 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2024-06-17 15:48:13 +0200 |
commit | b986055dd04141efd6d5dcdacd48d6b38cf320c8 (patch) | |
tree | 4fb32f76ea4ab23b703b01e94adab7afc6e4b120 /kernel/irq | |
parent | 419e3778ff295c00aa158d9f2854a70b47ba1136 (diff) |
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: Herve Codina <herve.codina@bootlin.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20240614173232.1184015-10-herve.codina@bootlin.com
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/irqdomain.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 1269a8104e6c..8dc0007cdec1 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c @@ -1213,23 +1213,16 @@ struct irq_domain *irq_domain_create_hierarchy(struct irq_domain *parent, .hwirq_max = size, .ops = ops, .host_data = host_data, + .domain_flags = flags, + .parent = parent, }; - struct irq_domain *domain; + struct irq_domain *d; if (!info.size) info.hwirq_max = ~0U; - domain = __irq_domain_create(&info); - if (domain) { - if (parent) - domain->root = parent->root; - domain->parent = parent; - domain->flags |= flags; - - __irq_domain_publish(domain); - } - - return domain; + d = irq_domain_instantiate(&info); + return IS_ERR(d) ? NULL : d; } EXPORT_SYMBOL_GPL(irq_domain_create_hierarchy); |