Skip to content

Commit 6159c47

Browse files
jhovoldMarc Zyngier
authored andcommitted
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é <[email protected]> Tested-by: Hsin-Yi Wang <[email protected]> Tested-by: Mark-PK Tsai <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 331f9aa commit 6159c47

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

drivers/irqchip/irq-loongson-pch-msi.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -163,16 +163,15 @@ static int pch_msi_init_domains(struct pch_msi_data *priv,
163163
{
164164
struct irq_domain *middle_domain, *msi_domain;
165165

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);
170170
if (!middle_domain) {
171171
pr_err("Failed to create the MSI middle domain\n");
172172
return -ENOMEM;
173173
}
174174

175-
middle_domain->parent = parent;
176175
irq_domain_update_bus_token(middle_domain, DOMAIN_BUS_NEXUS);
177176

178177
msi_domain = pci_msi_create_irq_domain(domain_handle,

0 commit comments

Comments
 (0)