forked from Minki/linux
PCI/sysfs: Use pci_irq_vector()
instead of fiddling with MSI descriptors. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Tested-by: Juergen Gross <jgross@suse.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20211206210224.265589103@linutronix.de
This commit is contained in:
parent
ade044a3d0
commit
793c500676
@ -62,11 +62,8 @@ static ssize_t irq_show(struct device *dev,
|
||||
* For MSI, show the first MSI IRQ; for all other cases including
|
||||
* MSI-X, show the legacy INTx IRQ.
|
||||
*/
|
||||
if (pdev->msi_enabled) {
|
||||
struct msi_desc *desc = first_pci_msi_entry(pdev);
|
||||
|
||||
return sysfs_emit(buf, "%u\n", desc->irq);
|
||||
}
|
||||
if (pdev->msi_enabled)
|
||||
return sysfs_emit(buf, "%u\n", pci_irq_vector(pdev, 0));
|
||||
#endif
|
||||
|
||||
return sysfs_emit(buf, "%u\n", pdev->irq);
|
||||
|
Loading…
Reference in New Issue
Block a user