diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-04-06 23:09:47 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2011-06-07 19:08:43 -0400 |
commit | 64099d981c9916ec4a485b3ffbb89fa877fc595f (patch) | |
tree | 363409e3a5bafdbbfbeffe6f93f1c2338f1c893b /include/linux/pci.h | |
parent | 3d5fe5a65af9c0b609d6e26b8d63fe5923c4e512 (diff) |
pci/of: Consolidate pci_device_to_OF_node()
All archs do more or less the same thing now, move it into
a single generic place.
I chose pci.h rather than of_pci.h to avoid having to change
all call-sites to include the later.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Michal Simek <monstr@monstr.eu>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r-- | include/linux/pci.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index e5086e9a9bf7..795e6a56d8cd 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h | |||
@@ -1600,6 +1600,11 @@ extern void pci_release_bus_of_node(struct pci_bus *bus); | |||
1600 | /* Arch may override this (weak) */ | 1600 | /* Arch may override this (weak) */ |
1601 | extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); | 1601 | extern struct device_node * __weak pcibios_get_phb_of_node(struct pci_bus *bus); |
1602 | 1602 | ||
1603 | static inline struct device_node *pci_device_to_OF_node(struct pci_dev *pdev) | ||
1604 | { | ||
1605 | return pdev ? pdev->dev.of_node : NULL; | ||
1606 | } | ||
1607 | |||
1603 | #else /* CONFIG_OF */ | 1608 | #else /* CONFIG_OF */ |
1604 | static inline void pci_set_of_node(struct pci_dev *dev) { } | 1609 | static inline void pci_set_of_node(struct pci_dev *dev) { } |
1605 | static inline void pci_release_of_node(struct pci_dev *dev) { } | 1610 | static inline void pci_release_of_node(struct pci_dev *dev) { } |