summaryrefslogtreecommitdiff
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2018-04-04 13:27:45 -0500
committerBjorn Helgaas <helgaas@kernel.org>2018-04-04 13:27:45 -0500
commit43b90eaed57679731ae340a47cef49e59a321c2e (patch)
tree8fe583ff17647d4b079c977a2b899b738669adcf /include/linux/pci.h
parent3da1b6174ba3f573ee795cc25c4b8633749bd036 (diff)
parentad32eb2df801548a4b55802384fbbfbc04d76bfa (diff)
Merge branch 'pci/misc'
- use PCI_EXP_DEVCTL2_COMP_TIMEOUT in rapidio/tsi721 (Bjorn Helgaas) - remove possible NULL pointer dereference in of_pci_bus_find_domain_nr() (Shawn Lin) - report quirk timings with dev_info (Bjorn Helgaas) - report quirks that take longer than 10ms (Bjorn Helgaas) - add and use Altera Vendor ID (Johannes Thumshirn) - tidy Makefiles and comments (Bjorn Helgaas) * pci/misc: PCI: Always define the of_node helpers PCI: Tidy comments PCI: Tidy Makefiles mcb: Add Altera PCI ID to mcb-pci PCI: Add Altera vendor ID PCI: Report quirks that take more than 10ms PCI: Report quirk timings with pci_info() instead of pr_debug() PCI: Fix NULL pointer dereference in of_pci_bus_find_domain_nr() rapidio/tsi721: use PCI_EXP_DEVCTL2_COMP_TIMEOUT macro
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h24
1 files changed, 11 insertions, 13 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index df9fc9d4de81..a718b2ddec64 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -2180,24 +2180,11 @@ int pci_parse_request_of_pci_ranges(struct device *dev,
/* Arch may override this (weak) */
struct device_node *pcibios_get_phb_of_node(struct pci_bus *bus);
-static inline struct device_node *
-pci_device_to_OF_node(const struct pci_dev *pdev)
-{
- return pdev ? pdev->dev.of_node : NULL;
-}
-
-static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
-{
- return bus ? bus->dev.of_node : NULL;
-}
-
#else /* CONFIG_OF */
static inline void pci_set_of_node(struct pci_dev *dev) { }
static inline void pci_release_of_node(struct pci_dev *dev) { }
static inline void pci_set_bus_of_node(struct pci_bus *bus) { }
static inline void pci_release_bus_of_node(struct pci_bus *bus) { }
-static inline struct device_node *
-pci_device_to_OF_node(const struct pci_dev *pdev) { return NULL; }
static inline struct irq_domain *
pci_host_bridge_of_msi_domain(struct pci_bus *bus) { return NULL; }
static inline int pci_parse_request_of_pci_ranges(struct device *dev,
@@ -2208,6 +2195,17 @@ static inline int pci_parse_request_of_pci_ranges(struct device *dev,
}
#endif /* CONFIG_OF */
+static inline struct device_node *
+pci_device_to_OF_node(const struct pci_dev *pdev)
+{
+ return pdev ? pdev->dev.of_node : NULL;
+}
+
+static inline struct device_node *pci_bus_to_OF_node(struct pci_bus *bus)
+{
+ return bus ? bus->dev.of_node : NULL;
+}
+
#ifdef CONFIG_ACPI
struct irq_domain *pci_host_bridge_acpi_msi_domain(struct pci_bus *bus);