PCI: Fix allnoconfig with PCI DMA source quirk
PATCH 1/1 PCI: Fix allnoconfig with PCI DMA source quirk
When CONFIG_PCI_QUIRKS is not defined we want to keep the reference counting the same for callers of pci_get_dma_source. But I forgot to account for !CONFIG_PCI where we then need to make an inline for pci_get_dev. This fixes it.
Signed-off-by Alex Williamson <[email protected]>
---
include/linux/pci.h | 3 +++ 1 file changed, 3 insertions(+)
include/linux/pci.h +3 -0
@@ -1368,6 +1368,9 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus,static inline int pci_domain_nr (struct pci_bus *bus) {return 0 ; } +static inline struct pci_dev *pci_dev_get (struct pci_dev *dev) +{return NULL ; } +#define dev_is_pci (d) (false)#define dev_is_pf (d) (false)#define dev_num_vf (d) (0)
Bjorn Helgaas
maintainerQuoted 16 lines · Alex Williamson
When
CONFIG_PCI_QUIRKSis not defined we want to keep the reference counting the same for callers ofpci_get_dma_source. But I forgot to account for !CONFIG_PCI where we then need to make an inline forpci_get_dev. This fixes it.Signed-off-by Alex Williamson <[email protected]>---
include/linux/pci.h | 3 +++
1 file changed, 3 insertions(+)include/linux/pci.h +0
-0
include/linux/pci.h static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, · line 1372
Quoted 5 lines
include/linux/pci.h +2
-0@@ -1368,6 +1368,9 @@ static inline struct pci_dev *pci_get_bus_and_slot(unsigned int bus, static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } +static inline struct pci_dev *pci_dev_get (struct pci_dev *dev) +{return NULL ; }
I folded this into patch [1/5] and will rebase "next" today.