diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-19 23:11:36 +0200 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2016-04-30 18:36:22 +0200 |
commit | 61cbbfb9198ec7723cb1db2ed2f7ca7a72f92f00 (patch) | |
tree | f9192889995592c41c9be30302ddaab2b9190e96 /backport/backport-include/linux/pci.h | |
parent | 8408ac947ef358f88431100a7dbd55c42482e5f4 (diff) |
header: add pci_enable_msix_exact()
This was added in upstream commit f7fc32cb20 "PCI/MSI: Add
pci_enable_msi_exact() and pci_enable_msix_exact()" and is used by the
mwifiex driver.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'backport/backport-include/linux/pci.h')
-rw-r--r-- | backport/backport-include/linux/pci.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h index f168bde3..081b4c7c 100644 --- a/backport/backport-include/linux/pci.h +++ b/backport/backport-include/linux/pci.h @@ -164,4 +164,24 @@ static inline int pci_enable_msix_range(struct pci_dev *dev, bool pci_device_is_present(struct pci_dev *pdev); #endif +#ifdef CONFIG_PCI +#if LINUX_VERSION_CODE < KERNEL_VERSION(3,14,0) +#define pci_enable_msix_exact LINUX_BACKPORT(pci_enable_msix_exact) +#ifdef CONFIG_PCI_MSI +static inline int pci_enable_msix_exact(struct pci_dev *dev, + struct msix_entry *entries, int nvec) +{ + int rc = pci_enable_msix_range(dev, entries, nvec, nvec); + if (rc < 0) + return rc; + return 0; +} +#else +static inline int pci_enable_msix_exact(struct pci_dev *dev, + struct msix_entry *entries, int nvec) +{ return -ENOSYS; } +#endif /* CONFIG_PCI_MSI */ +#endif +#endif /* CONFIG_PCI */ + #endif /* _BACKPORT_LINUX_PCI_H */ |