[PATCH 1/1] PCI: fix the build when CONFIG_PCI_QUIRKS=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When CONFIG_PCI_QUIRKS=n, the kernel build fails:
> drivers/built-in.o: In function `pci_dev_reset':
> pci.c:(.text+0xdb0b): undefined reference to `pci_dev_reset_methods'
> pci.c:(.text+0xdb2b): undefined reference to `pci_dev_reset_methods'
> pci.c:(.text+0xdb85): undefined reference to `pci_dev_reset_methods'

We should add a dummy pci_dev_reset_methods[] in this case.

Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx>
---
 drivers/pci/quirks.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 8726698..15de139 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2692,6 +2692,10 @@ struct pci_dev_reset_methods pci_dev_reset_methods[] = {
 	{ 0 }
 };
 #else
+struct pci_dev_reset_methods pci_dev_reset_methods[] = {
+	{ 0 }
+};
+
 void pci_fixup_device(enum pci_fixup_pass pass, struct pci_dev *dev) {}
 #endif
 EXPORT_SYMBOL(pci_fixup_device);
-- 
1.6.0

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux