summaryrefslogtreecommitdiff
path: root/drivers/pci/msi/msi.c
diff options
context:
space:
mode:
authorAhmed S. Darwish <darwi@linutronix.de>2022-11-11 16:54:56 +0300
committerThomas Gleixner <tglx@linutronix.de>2022-11-17 17:15:21 +0300
commit7b50f62776672e7b328455eddc90ceb01b64ac3e (patch)
treef3d93103a877a43d9dd5961df3977e7efbf12ea1 /drivers/pci/msi/msi.c
parent059f778d66ba88e1acad89a46cfb35eb8703feef (diff)
downloadlinux-7b50f62776672e7b328455eddc90ceb01b64ac3e.tar.xz
PCI/MSI: Move pci_msix_vec_count() to api.c
To disentangle the maze in msi.c, all exported device-driver MSI APIs are now to be grouped in one file, api.c. Move pci_msix_vec_count() and make its kernel-doc comprehensive. Signed-off-by: Ahmed S. Darwish <darwi@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://lore.kernel.org/r/20221111122015.099461602@linutronix.de
Diffstat (limited to 'drivers/pci/msi/msi.c')
-rw-r--r--drivers/pci/msi/msi.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/pci/msi/msi.c b/drivers/pci/msi/msi.c
index ed8caf5ac99f..1226d66da992 100644
--- a/drivers/pci/msi/msi.c
+++ b/drivers/pci/msi/msi.c
@@ -701,26 +701,6 @@ void pci_msi_shutdown(struct pci_dev *dev)
pcibios_alloc_irq(dev);
}
-/**
- * pci_msix_vec_count - return the number of device's MSI-X table entries
- * @dev: pointer to the pci_dev data structure of MSI-X device function
- * This function returns the number of device's MSI-X table entries and
- * therefore the number of MSI-X vectors device is capable of sending.
- * It returns a negative errno if the device is not capable of sending MSI-X
- * interrupts.
- **/
-int pci_msix_vec_count(struct pci_dev *dev)
-{
- u16 control;
-
- if (!dev->msix_cap)
- return -EINVAL;
-
- pci_read_config_word(dev, dev->msix_cap + PCI_MSIX_FLAGS, &control);
- return msix_table_size(control);
-}
-EXPORT_SYMBOL(pci_msix_vec_count);
-
static int __pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries,
int nvec, struct irq_affinity *affd, int flags)
{