[PATCH 07/11] irqchip/loongson-pch-msi: Convert to msi_create_parent_irq_domain() helper

Marc Zyngier
2024-12-04T12:46:08Z

switch the Loongson MSI stuff over to that.

Signed-off-by: Marc Zyngier <maz@kernel.org>
---
drivers/irqchip/irq-loongson-pch-msi.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/irqchip/irq-loongson-pch-msi.c b/drivers/irqchip/irq-loongson-pch-msi.c
index 3f6f4e9887c53..f15528f76a647 100644
--- a/drivers/irqchip/irq-loongson-pch-msi.c
+++ b/drivers/irqchip/irq-loongson-pch-msi.c
@@ -158,20 +158,15 @@ static int pch_msi_init_domains(struct pch_msi_data *priv,
{
struct irq_domain *middle_domain;

- middle_domain = irq_domain_create_hierarchy(parent, 0, priv->num_irqs,
- domain_handle,
- &pch_msi_middle_domain_ops,
- priv);
+ middle_domain = msi_create_parent_irq_domain(domain_handle,
+ &pch_msi_parent_ops,
+ &pch_msi_middle_domain_ops, 0,
+ priv->num_irqs, priv, parent);
if (!middle_domain) {
pr_err("Failed to create the MSI middle domain\n");
return -ENOMEM;
}

- irq_domain_update_bus_token(middle_domain, DOMAIN_BUS_NEXUS);
-
- middle_domain->flags |= IRQ_DOMAIN_FLAG_MSI_PARENT;
- middle_domain->msi_parent_ops = &pch_msi_parent_ops;
-
return 0;
}

--
2.39.2