PCI: Provide pci_match_id() with CONFIG_PCI=n
authorLubomir Rintel <lkundrak@v3.sk>
Wed, 10 Oct 2018 17:09:27 +0000 (19:09 +0200)
committerMark Brown <broonie@kernel.org>
Fri, 12 Oct 2018 16:50:01 +0000 (18:50 +0200)
This spares drivers from #ifdef-ing on CONFIG_PCI if the driver can be
optionally built on machines without PCI bus.

Consistent with acpi_driver_match_device() and similar.

Acked-by: Bjorn Helgaas <bhelgaas@google.com>
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
Signed-off-by: Mark Brown <broonie@kernel.org>
include/linux/pci.h

index e72ca8dd6241b88cae56cc27de7e05e10182f267..d2f14eb23ea4c11eccf23e1e27f777a9738b2e66 100644 (file)
@@ -1702,6 +1702,10 @@ static inline int pci_irqd_intx_xlate(struct irq_domain *d,
                                      unsigned long *out_hwirq,
                                      unsigned int *out_type)
 { return -EINVAL; }
+
+static inline const struct pci_device_id *pci_match_id(const struct pci_device_id *ids,
+                                                        struct pci_dev *dev)
+{ return NULL; }
 #endif /* CONFIG_PCI */
 
 /* Include architecture-dependent settings and functions */