PCI: Add Kconfig option to disable deprecated pci_find_* API
[firefly-linux-kernel-4.4.55.git] / include / linux / pci.h
index 5b23ec7f6cd96d3b9f5801452890cad377e3362d..0dd93bb62fbe9f4af33c458f24db96ca79d8c0c2 100644 (file)
@@ -488,8 +488,11 @@ extern void pci_sort_breadthfirst(void);
 
 /* Generic PCI functions exported to card drivers */
 
+#ifdef CONFIG_PCI_LEGACY
 struct pci_dev __deprecated *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from);
 struct pci_dev __deprecated *pci_find_slot (unsigned int bus, unsigned int devfn);
+#endif /* CONFIG_PCI_LEGACY */
+
 int pci_find_capability (struct pci_dev *dev, int cap);
 int pci_find_next_capability (struct pci_dev *dev, u8 pos, int cap);
 int pci_find_ext_capability (struct pci_dev *dev, int cap);