diff options
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index ebf75f760bd3..276c546980d8 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -136,7 +136,9 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) | |||
136 | return of_read_number(cell, size); | 136 | return of_read_number(cell, size); |
137 | } | 137 | } |
138 | 138 | ||
139 | #if defined(CONFIG_SPARC) | ||
139 | #include <asm/prom.h> | 140 | #include <asm/prom.h> |
141 | #endif | ||
140 | 142 | ||
141 | /* Default #address and #size cells. Allow arch asm/prom.h to override */ | 143 | /* Default #address and #size cells. Allow arch asm/prom.h to override */ |
142 | #if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT) | 144 | #if !defined(OF_ROOT_NODE_ADDR_CELLS_DEFAULT) |
@@ -288,6 +290,7 @@ extern int of_n_size_cells(struct device_node *np); | |||
288 | extern const struct of_device_id *of_match_node( | 290 | extern const struct of_device_id *of_match_node( |
289 | const struct of_device_id *matches, const struct device_node *node); | 291 | const struct of_device_id *matches, const struct device_node *node); |
290 | extern int of_modalias_node(struct device_node *node, char *modalias, int len); | 292 | extern int of_modalias_node(struct device_node *node, char *modalias, int len); |
293 | extern void of_print_phandle_args(const char *msg, const struct of_phandle_args *args); | ||
291 | extern struct device_node *of_parse_phandle(const struct device_node *np, | 294 | extern struct device_node *of_parse_phandle(const struct device_node *np, |
292 | const char *phandle_name, | 295 | const char *phandle_name, |
293 | int index); | 296 | int index); |
@@ -377,6 +380,9 @@ static inline bool of_have_populated_dt(void) | |||
377 | #define for_each_child_of_node(parent, child) \ | 380 | #define for_each_child_of_node(parent, child) \ |
378 | while (0) | 381 | while (0) |
379 | 382 | ||
383 | #define for_each_available_child_of_node(parent, child) \ | ||
384 | while (0) | ||
385 | |||
380 | static inline struct device_node *of_get_child_by_name( | 386 | static inline struct device_node *of_get_child_by_name( |
381 | const struct device_node *node, | 387 | const struct device_node *node, |
382 | const char *name) | 388 | const char *name) |
@@ -552,13 +558,10 @@ static inline const char *of_prop_next_string(struct property *prop, | |||
552 | #define of_match_node(_matches, _node) NULL | 558 | #define of_match_node(_matches, _node) NULL |
553 | #endif /* CONFIG_OF */ | 559 | #endif /* CONFIG_OF */ |
554 | 560 | ||
555 | #ifndef of_node_to_nid | 561 | #if defined(CONFIG_OF) && defined(CONFIG_NUMA) |
556 | static inline int of_node_to_nid(struct device_node *np) | 562 | extern int of_node_to_nid(struct device_node *np); |
557 | { | 563 | #else |
558 | return numa_node_id(); | 564 | static inline int of_node_to_nid(struct device_node *device) { return 0; } |
559 | } | ||
560 | |||
561 | #define of_node_to_nid of_node_to_nid | ||
562 | #endif | 565 | #endif |
563 | 566 | ||
564 | /** | 567 | /** |