diff mbox series

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

Message ID 20241204124549.607054-8-maz@kernel.org (mailing list archive)
State New
Headers show
Series irqchip: MSI parent cleanup and PCI host driver conversion | expand

Commit Message

Marc Zyngier Dec. 4, 2024, 12:45 p.m. UTC
Now that we have a concise helper to create an MSI parent domain,
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 mbox series

Patch

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;
 }