From 35c0c4c5ba3867a66b84a6fe7fb4415deba5ef20 Mon Sep 17 00:00:00 2001 From: Winnie Chang Date: Wed, 7 Nov 2018 09:37:41 +0000 Subject: 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 Signed-off-by: Chi-Hsien Lin Signed-off-by: Johannes Berg --- backport/compat/backport-4.8.c | 4 ++++ 1 file changed, 4 insertions(+) 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 */ -- cgit v1.2.3