From: Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com>
To: "backports@vger.kernel.org" <backports@vger.kernel.org>,
Johannes Berg <johannes.berg@intel.com>
Cc: Winnie Chang <Winnie.Chang@cypress.com>,
Winnie Chang <Winnie.Chang@cypress.com>,
Chi-Hsien Lin <Chi-Hsien.Lin@cypress.com>
Subject: [PATCH] backports: wrap pci_alloc_irq_vectors() in PCI defines
Date: Wed, 7 Nov 2018 09:37:41 +0000 [thread overview]
Message-ID: <1541583418-196225-1-git-send-email-chi-hsien.lin@cypress.com> (raw)
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
next reply other threads:[~2018-11-07 9:37 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-07 9:37 Chi-Hsien Lin [this message]
2018-11-07 9:39 ` [PATCH] backports: wrap pci_alloc_irq_vectors() in PCI defines Johannes Berg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1541583418-196225-1-git-send-email-chi-hsien.lin@cypress.com \
--to=chi-hsien.lin@cypress.com \
--cc=Winnie.Chang@cypress.com \
--cc=backports@vger.kernel.org \
--cc=johannes.berg@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).