diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 14:07:22 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-07-24 14:07:22 -0700 |
commit | f14121ab35912e3d2e57ac9a4ce1f9d4b7baeffb (patch) | |
tree | 7d5b4799998760e0a88166185abff1147d4ee04d /include/linux/of.h | |
parent | 914311c9fb9bc01a215de9d848b72b5449c0e342 (diff) | |
parent | e95d8aafa5d911bf523bc47fe89f3336eb8a1b51 (diff) | |
download | blackbird-op-linux-f14121ab35912e3d2e57ac9a4ce1f9d4b7baeffb.tar.gz blackbird-op-linux-f14121ab35912e3d2e57ac9a4ce1f9d4b7baeffb.zip |
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/of.h')
-rw-r--r-- | include/linux/of.h | 10 |
1 files changed, 10 insertions, 0 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; } #define of_node_to_nid of_node_to_nid #endif +static inline const char* of_node_full_name(struct device_node *np) +{ + return np ? np->full_name : "<no-node>"; +} + extern struct device_node *of_find_node_by_name(struct device_node *from, const char *name); #define for_each_node_by_name(dn, name) \ @@ -302,6 +307,11 @@ const char *of_prop_next_string(struct property *prop, const char *cur); #else /* CONFIG_OF */ +static inline const char* of_node_full_name(struct device_node *np) +{ + return "<no-node>"; +} + static inline bool of_have_populated_dt(void) { return false; |