]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
PCI: Add pci_device_to_OF_node() stub for !CONFIG_OF
authorKevin Hao <haokexin@gmail.com>
Tue, 3 Feb 2015 15:29:52 +0000 (09:29 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 3 Feb 2015 15:29:52 +0000 (09:29 -0600)
Add a stub for pci_device_to_OF_node() so drivers don't need to
use #ifdef CONFIG_OF around calls to it.

Signed-off-by: Kevin Hao <haokexin@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
include/linux/pci.h

index 360a966a97a5807f7ff13441748c0c93850ff7e1..fbb5795a8d86bd83a8a013525f68ef047f6842b6 100644 (file)
@@ -1847,6 +1847,8 @@ 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; }
 #endif  /* CONFIG_OF */
 
 #ifdef CONFIG_EEH