diff mbox series

[v2,02/11] PCI: Provide pci_match_id() with CONFIG_PCI=n

Message ID 20181010170936.316862-3-lkundrak@v3.sk (mailing list archive)
State New, archived
Headers show
Series spi: pxa2xx: add DT and slave mode support | expand

Commit Message

Lubomir Rintel Oct. 10, 2018, 5:09 p.m. UTC
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>

---
Changes since v1:
- Capitalization in the commit message

 include/linux/pci.h | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Pavel Machek Nov. 4, 2018, 12:02 p.m. UTC | #1
On Wed 2018-10-10 19:09:27, Lubomir Rintel wrote:
> 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>

Acked-by: Pavel Machek <pavel@ucw.cz>
									Pavel
diff mbox series

Patch

diff --git a/include/linux/pci.h b/include/linux/pci.h
index 6925828f9f25..2c4755032475 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1705,6 +1705,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 */