Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip/gic-v2m: Use irq_domain_create_hierarchy()

Use the irq_domain_create_hierarchy() helper to create the hierarchical
domain, which both serves as documentation and avoids poking at
irqdomain internals.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Tested-by: Hsin-Yi Wang <hsinyi@chromium.org>
Tested-by: Mark-PK Tsai <mark-pk.tsai@mediatek.com>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230213104302.17307-16-johan+linaro@kernel.org

authored by

Johan Hovold and committed by
Marc Zyngier
e6e8cd62 6c889231

+2 -3
+2 -3
drivers/irqchip/irq-gic-v2m.c
··· 287 287 if (!v2m) 288 288 return 0; 289 289 290 - inner_domain = irq_domain_create_tree(v2m->fwnode, 291 - &gicv2m_domain_ops, v2m); 290 + inner_domain = irq_domain_create_hierarchy(parent, 0, 0, v2m->fwnode, 291 + &gicv2m_domain_ops, v2m); 292 292 if (!inner_domain) { 293 293 pr_err("Failed to create GICv2m domain\n"); 294 294 return -ENOMEM; 295 295 } 296 296 297 297 irq_domain_update_bus_token(inner_domain, DOMAIN_BUS_NEXUS); 298 - inner_domain->parent = parent; 299 298 pci_domain = pci_msi_create_irq_domain(v2m->fwnode, 300 299 &gicv2m_msi_domain_info, 301 300 inner_domain);