|
@@ -1600,6 +1600,11 @@ extern void pci_release_bus_of_node(struct pci_bus *bus);
|
|
/* Arch may override this (weak) */
|
|
/* Arch may override this (weak) */
|
|
extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus);
|
|
extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus);
|
|
|
|
|
|
|
|
+static inline struct device_node *pci_device_to_OF_node(struct pci_dev *pdev)
|
|
|
|
+{
|
|
|
|
+ return pdev ? pdev->dev.of_node : NULL;
|
|
|
|
+}
|
|
|
|
+
|
|
#else /* CONFIG_OF */
|
|
#else /* CONFIG_OF */
|
|
static inline void pci_set_of_node(struct pci_dev *dev) { }
|
|
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_release_of_node(struct pci_dev *dev) { }
|