diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/of.h | 10 | ||||
| -rw-r--r-- | include/linux/of_mtd.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index b27c87191df2..0e9cf9eec085 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
| @@ -163,6 +163,11 @@ static inline int of_node_to_nid(struct device_node *np) { return -1; } | |||
| 163 | #define of_node_to_nid of_node_to_nid | 163 | #define of_node_to_nid of_node_to_nid |
| 164 | #endif | 164 | #endif |
| 165 | 165 | ||
| 166 | static inline const char* of_node_full_name(struct device_node *np) | ||
| 167 | { | ||
| 168 | return np ? np->full_name : "<no-node>"; | ||
| 169 | } | ||
| 170 | |||
| 166 | extern struct device_node *of_find_node_by_name(struct device_node *from, | 171 | extern struct device_node *of_find_node_by_name(struct device_node *from, |
| 167 | const char *name); | 172 | const char *name); |
| 168 | #define for_each_node_by_name(dn, name) \ | 173 | #define for_each_node_by_name(dn, name) \ |
| @@ -302,6 +307,11 @@ const char *of_prop_next_string(struct property *prop, const char *cur); | |||
| 302 | 307 | ||
| 303 | #else /* CONFIG_OF */ | 308 | #else /* CONFIG_OF */ |
| 304 | 309 | ||
| 310 | static inline const char* of_node_full_name(struct device_node *np) | ||
| 311 | { | ||
| 312 | return "<no-node>"; | ||
| 313 | } | ||
| 314 | |||
| 305 | static inline bool of_have_populated_dt(void) | 315 | static inline bool of_have_populated_dt(void) |
| 306 | { | 316 | { |
| 307 | return false; | 317 | return false; |
diff --git a/include/linux/of_mtd.h b/include/linux/of_mtd.h index bae1b6094c63..ed7f267e6389 100644 --- a/include/linux/of_mtd.h +++ b/include/linux/of_mtd.h | |||
| @@ -11,7 +11,7 @@ | |||
| 11 | 11 | ||
| 12 | #ifdef CONFIG_OF_MTD | 12 | #ifdef CONFIG_OF_MTD |
| 13 | #include <linux/of.h> | 13 | #include <linux/of.h> |
| 14 | extern const int of_get_nand_ecc_mode(struct device_node *np); | 14 | int of_get_nand_ecc_mode(struct device_node *np); |
| 15 | int of_get_nand_bus_width(struct device_node *np); | 15 | int of_get_nand_bus_width(struct device_node *np); |
| 16 | bool of_get_nand_on_flash_bbt(struct device_node *np); | 16 | bool of_get_nand_on_flash_bbt(struct device_node *np); |
| 17 | #endif | 17 | #endif |
