dt: add empty of_get_node/of_put_node functions

Add empty of_get_node/of_put_node functions for !CONFIG_OF builds.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
Rob Herring 2011-12-13 09:13:54 -06:00
Родитель 75c71848f2
Коммит 3ecdd05152
1 изменённых файлов: 14 добавлений и 15 удалений

Просмотреть файл

@ -65,6 +65,20 @@ struct device_node {
#endif #endif
}; };
#if defined(CONFIG_SPARC) || !defined(CONFIG_OF)
/* Dummy ref counting routines - to be implemented later */
static inline struct device_node *of_node_get(struct device_node *node)
{
return node;
}
static inline void of_node_put(struct device_node *node)
{
}
#else
extern struct device_node *of_node_get(struct device_node *node);
extern void of_node_put(struct device_node *node);
#endif
#ifdef CONFIG_OF #ifdef CONFIG_OF
/* Pointer for first entry in chain of all nodes. */ /* Pointer for first entry in chain of all nodes. */
@ -95,21 +109,6 @@ static inline void of_node_set_flag(struct device_node *n, unsigned long flag)
extern struct device_node *of_find_all_nodes(struct device_node *prev); extern struct device_node *of_find_all_nodes(struct device_node *prev);
#if defined(CONFIG_SPARC)
/* Dummy ref counting routines - to be implemented later */
static inline struct device_node *of_node_get(struct device_node *node)
{
return node;
}
static inline void of_node_put(struct device_node *node)
{
}
#else
extern struct device_node *of_node_get(struct device_node *node);
extern void of_node_put(struct device_node *node);
#endif
/* /*
* OF address retrieval & translation * OF address retrieval & translation
*/ */