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

irqchip/loongson-pch-msi: 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-19-johan+linaro@kernel.org

authored by

Johan Hovold and committed by
Marc Zyngier
6159c470 331f9aac

+4 -5
+4 -5
drivers/irqchip/irq-loongson-pch-msi.c
··· 163 163 { 164 164 struct irq_domain *middle_domain, *msi_domain; 165 165 166 - middle_domain = irq_domain_create_linear(domain_handle, 167 - priv->num_irqs, 168 - &pch_msi_middle_domain_ops, 169 - priv); 166 + middle_domain = irq_domain_create_hierarchy(parent, 0, priv->num_irqs, 167 + domain_handle, 168 + &pch_msi_middle_domain_ops, 169 + priv); 170 170 if (!middle_domain) { 171 171 pr_err("Failed to create the MSI middle domain\n"); 172 172 return -ENOMEM; 173 173 } 174 174 175 - middle_domain->parent = parent; 176 175 irq_domain_update_bus_token(middle_domain, DOMAIN_BUS_NEXUS); 177 176 178 177 msi_domain = pci_msi_create_irq_domain(domain_handle,