diff options
author | Gavin Shan <shangw@linux.vnet.ibm.com> | 2013-04-04 12:54:31 -0400 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-04-23 11:50:30 -0400 |
commit | cdf1fd4d906bc8c06510fd3e1d6a073441792792 (patch) | |
tree | 96159b3a688b284881506a40281fa73248e79b0e /drivers/pci | |
parent | e375b561817d9ae098cc4296a729fc88924a0159 (diff) |
PCI: Remove MSI/MSI-X cap check in pci_msi_check_device()
The function pci_msi_check_device() is called while enabling MSI
or MSI-X interrupts to make sure the PCI device can support MSI
or MSI-X capability. This patch removes the check on MSI or MSI-X
capability in the function and lets the caller do the check.
Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/msi.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/pci/msi.c b/drivers/pci/msi.c index 99befbd99938..60a4b10fa99c 100644 --- a/drivers/pci/msi.c +++ b/drivers/pci/msi.c | |||
@@ -789,9 +789,6 @@ static int pci_msi_check_device(struct pci_dev *dev, int nvec, int type) | |||
789 | if (ret) | 789 | if (ret) |
790 | return ret; | 790 | return ret; |
791 | 791 | ||
792 | if (!pci_find_capability(dev, type)) | ||
793 | return -EINVAL; | ||
794 | |||
795 | return 0; | 792 | return 0; |
796 | } | 793 | } |
797 | 794 | ||
@@ -942,7 +939,7 @@ int pci_enable_msix(struct pci_dev *dev, struct msix_entry *entries, int nvec) | |||
942 | int status, nr_entries; | 939 | int status, nr_entries; |
943 | int i, j; | 940 | int i, j; |
944 | 941 | ||
945 | if (!entries) | 942 | if (!entries || !dev->msix_cap) |
946 | return -EINVAL; | 943 | return -EINVAL; |
947 | 944 | ||
948 | status = pci_msi_check_device(dev, nvec, PCI_CAP_ID_MSIX); | 945 | status = pci_msi_check_device(dev, nvec, PCI_CAP_ID_MSIX); |