mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
irqchip/loongson-pch-msi.c: Switch to msi_create_parent_irq_domain()
Switch to use the concise helper to create an MSI parent domain. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Nam Cao <namcao@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/7ae78d7b7e33ad8ca1ec2ba28957546c81ba86f7.1750860131.git.namcao@linutronix.de
This commit is contained in:
@@ -153,26 +153,21 @@ static struct msi_parent_ops pch_msi_parent_ops = {
|
||||
.init_dev_msi_info = msi_lib_init_dev_msi_info,
|
||||
};
|
||||
|
||||
static int pch_msi_init_domains(struct pch_msi_data *priv,
|
||||
struct irq_domain *parent,
|
||||
static int pch_msi_init_domains(struct pch_msi_data *priv, struct irq_domain *parent,
|
||||
struct fwnode_handle *domain_handle)
|
||||
{
|
||||
struct irq_domain *middle_domain;
|
||||
struct irq_domain_info info = {
|
||||
.ops = &pch_msi_middle_domain_ops,
|
||||
.size = priv->num_irqs,
|
||||
.parent = parent,
|
||||
.host_data = priv,
|
||||
.fwnode = domain_handle,
|
||||
};
|
||||
|
||||
middle_domain = irq_domain_create_hierarchy(parent, 0, priv->num_irqs,
|
||||
domain_handle,
|
||||
&pch_msi_middle_domain_ops,
|
||||
priv);
|
||||
if (!middle_domain) {
|
||||
if (!msi_create_parent_irq_domain(&info, &pch_msi_parent_ops)) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user