Backports Archive on lore.kernel.org
 help / Atom feed
* [PATCH] backports: wrap pci_alloc_irq_vectors() in PCI defines
@ 2018-11-07  9:37 Chi-Hsien Lin
  2018-11-07  9:39 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Chi-Hsien Lin @ 2018-11-07  9:37 UTC (permalink / raw)
  To: backports, Johannes Berg; +Cc: Winnie Chang, Winnie Chang, Chi-Hsien Lin

From: Winnie Chang <Winnie.Chang@cypress.com>

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>
---
 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 e583c1eca01e..a53e39c96dab 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 */
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] backports: wrap pci_alloc_irq_vectors() in PCI defines
  2018-11-07  9:37 [PATCH] backports: wrap pci_alloc_irq_vectors() in PCI defines Chi-Hsien Lin
@ 2018-11-07  9:39 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2018-11-07  9:39 UTC (permalink / raw)
  To: Chi-Hsien Lin, backports; +Cc: Winnie Chang

On Wed, 2018-11-07 at 09:37 +0000, Chi-Hsien Lin wrote:
> From: Winnie Chang <Winnie.Chang@cypress.com>
> 
> pci_alloc_irq_vectors() needs to be wrapped in CONFIG_PCI and
> CONFIG_PCI_MSI definition to avoid a function redefinition compiler
> error.

Applied, thanks!

johannes

--
To unsubscribe from this list: send the line "unsubscribe backports" in

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-07  9:37 [PATCH] backports: wrap pci_alloc_irq_vectors() in PCI defines Chi-Hsien Lin
2018-11-07  9:39 ` Johannes Berg

Backports Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/backports/0 backports/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 backports backports/ https://lore.kernel.org/backports \
		backports@vger.kernel.org backports@archiver.kernel.org
	public-inbox-index backports


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.backports


AGPL code for this site: git clone https://public-inbox.org/ public-inbox