diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 17:07:22 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 17:07:22 -0400 |
| commit | f14121ab35912e3d2e57ac9a4ce1f9d4b7baeffb (patch) | |
| tree | 7d5b4799998760e0a88166185abff1147d4ee04d /include/linux | |
| parent | 914311c9fb9bc01a215de9d848b72b5449c0e342 (diff) | |
| parent | e95d8aafa5d911bf523bc47fe89f3336eb8a1b51 (diff) | |
Merge tag 'dt-for-3.6' of git://sources.calxeda.com/kernel/linux
Pull devicetree updates from Rob Herring:
"A small set of changes for devicetree:
- Couple of Documentation fixes
- Addition of new helper function of_node_full_name
- Improve of_parse_phandle_with_args return values
- Some NULL related sparse fixes"
Grant's busy packing.
* tag 'dt-for-3.6' of git://sources.calxeda.com/kernel/linux:
of: mtd: nuke useless const qualifier
devicetree: add helper inline for retrieving a node's full name
of: return -ENOENT when no property
usage-model.txt: fix typo machine_init->init_machine
of: Fix null pointer related warnings in base.c file
LED: Fix missing semicolon in OF documentation
of: fix a few typos in the binding documentation
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 |
