Skip to content

Commit

Permalink
PCI: Provide pci_match_id() with CONFIG_PCI=n
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Lubomir Rintel authored and Mark Brown committed Oct 12, 2018
1 parent 25972d0 commit 9c21200
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/pci.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 9c21200

Please sign in to comment.