Add 2 "#ifndef CONFIG_PCI_QUIRKS #endif" checks properly. Signed-off-by: Dexuan Cui <dexuan.cui@xxxxxxxxx> --- drivers/pci/pci.c | 2 ++ drivers/pci/pci.h | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index 864e703..102f56e 100644 --- a/drivers/pci/pci.c +++ b/drivers/pci/pci.c @@ -2286,6 +2286,7 @@ static int pci_parent_bus_reset(struct pci_dev *dev, int probe) static int pci_dev_specific_reset(struct pci_dev *dev, int probe) { +#ifdef CONFIG_PCI_QUIRKS struct pci_dev_reset_methods *i; for (i = pci_dev_reset_methods; i->reset; i++) { @@ -2296,6 +2297,7 @@ static int pci_dev_specific_reset(struct pci_dev *dev, int probe) return i->reset(dev, probe); } +#endif return -ENOTTY; } diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 709eaa4..88546c7 100644 --- a/drivers/pci/pci.h +++ b/drivers/pci/pci.h @@ -313,6 +313,7 @@ static inline int pci_resource_alignment(struct pci_dev *dev, extern void pci_enable_acs(struct pci_dev *dev); +#ifdef CONFIG_PCI_QUIRKS struct pci_dev_reset_methods { u16 vendor; u16 device; @@ -320,5 +321,6 @@ struct pci_dev_reset_methods { }; extern struct pci_dev_reset_methods pci_dev_reset_methods[]; +#endif #endif /* DRIVERS_PCI_H */ -- 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