Skip to content

Commit 38c0c10

Browse files
Ahmed S. DarwishKAGA-KOKO
authored andcommitted
PCI/MSI: Use msi_domain_info:: Bus_token
Set the bus token in the msi_domain_info structure and let the core code handle the update. Signed-off-by: Ahmed S. Darwish <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Acked-by: Bjorn Helgaas <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 22db089 commit 38c0c10

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

drivers/pci/msi/irqdomain.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,6 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,
162162
struct msi_domain_info *info,
163163
struct irq_domain *parent)
164164
{
165-
struct irq_domain *domain;
166-
167165
if (WARN_ON(info->flags & MSI_FLAG_LEVEL_CAPABLE))
168166
info->flags &= ~MSI_FLAG_LEVEL_CAPABLE;
169167

@@ -178,13 +176,10 @@ struct irq_domain *pci_msi_create_irq_domain(struct fwnode_handle *fwnode,
178176

179177
/* PCI-MSI is oneshot-safe */
180178
info->chip->flags |= IRQCHIP_ONESHOT_SAFE;
179+
/* Let the core update the bus token */
180+
info->bus_token = DOMAIN_BUS_PCI_MSI;
181181

182-
domain = msi_create_irq_domain(fwnode, info, parent);
183-
if (!domain)
184-
return NULL;
185-
186-
irq_domain_update_bus_token(domain, DOMAIN_BUS_PCI_MSI);
187-
return domain;
182+
return msi_create_irq_domain(fwnode, info, parent);
188183
}
189184
EXPORT_SYMBOL_GPL(pci_msi_create_irq_domain);
190185

0 commit comments

Comments
 (0)