summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWinnie Chang <Winnie.Chang@cypress.com>2018-11-07 09:37:41 +0000
committerJohannes Berg <johannes.berg@intel.com>2018-11-07 10:38:41 +0100
commit35c0c4c5ba3867a66b84a6fe7fb4415deba5ef20 (patch)
treeeec5f1ba1b8eaa27cd9dfd10745a8c8cfbbddc8b
parent162a6b312f1b439cf0cf191564b21df0d3393564 (diff)
backports: wrap pci_alloc_irq_vectors() in PCI defines
pci_alloc_irq_vectors() needs to be wrapped in CONFIG_PCI and CONFIG_PCI_MSI definition to avoid a function redefinition compiler error. Fixes: 162a6b312f1b ("add support for pci_alloc_irq_vectors") Signed-off-by: Winnie Chang <winnie.chang@cypress.com> Signed-off-by: Chi-Hsien Lin <chi-hsien.lin@cypress.com> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
-rw-r--r--backport/compat/backport-4.8.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/backport/compat/backport-4.8.c b/backport/compat/backport-4.8.c
index e583c1ec..a53e39c9 100644
--- a/backport/compat/backport-4.8.c
+++ b/backport/compat/backport-4.8.c
@@ -146,6 +146,8 @@ next_desc:
}
EXPORT_SYMBOL_GPL(cdc_parse_cdc_header);
+#ifdef CONFIG_PCI
+#ifdef CONFIG_PCI_MSI
int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
unsigned int max_vecs, unsigned int flags)
{
@@ -167,3 +169,5 @@ int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
return -ENOSPC;
}
EXPORT_SYMBOL_GPL(pci_alloc_irq_vectors);
+#endif /* CONFIG_PCI_MSI */
+#endif /* CONFIG_PCI */