aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2009-10-15 12:58:02 -0400
committerGrant Likely <grant.likely@secretlab.ca>2009-10-15 12:58:02 -0400
commit526b5b3ed97bac22ed0c9feed97adcdc3a25244c (patch)
tree73ef4a838e5deb9c9865a5ce789d08ac567e9edf /include/linux/of.h
parentb6caf2ad7ce30648b89c1cf40d8f7cf6f4b58033 (diff)
of: merge of_node_get(), of_node_put() and of_find_all_nodes()
Merge common code between Sparc, PowerPC and Microblaze. Sparc differs in the implementation at this point, so this patch uses a #ifdef to handle sparc differently for now. The merging of implementations will occur in a later patch Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: David S. Miller <davem@davemloft.net> Acked-by: Wolfram Sang <w.sang@pengutronix.de> Acked-by: Michal Simek <monstr@monstr.eu> Acked-by: Stephen Neuendorffer <stephen.neuendorffer@xilinx.com> Acked-by: Stephen Rothwell <sfr@canb.auug.org.au>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 18e4379b8b7f..4636bba93afa 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -79,6 +79,22 @@ set_node_proc_entry(struct device_node *dn, struct proc_dir_entry *de)
79 dn->pde = de; 79 dn->pde = de;
80} 80}
81 81
82#if defined(CONFIG_SPARC)
83/* Dummy ref counting routines - to be implemented later */
84static inline struct device_node *of_node_get(struct device_node *node)
85{
86 return node;
87}
88static inline void of_node_put(struct device_node *node)
89{
90}
91
92#else
93extern struct device_node *of_find_all_nodes(struct device_node *prev);
94extern struct device_node *of_node_get(struct device_node *node);
95extern void of_node_put(struct device_node *node);
96#endif
97
82/* 98/*
83 * OF address retreival & translation 99 * OF address retreival & translation
84 */ 100 */