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 /drivers/of | |
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 'drivers/of')
-rw-r--r-- | drivers/of/base.c | 10 | ||||
-rw-r--r-- | drivers/of/irq.c | 2 | ||||
-rw-r--r-- | drivers/of/of_mtd.c | 2 |
3 files changed, 7 insertions, 7 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index a14f109dcd13..c181b94abc36 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -173,9 +173,9 @@ struct property *of_find_property(const struct device_node *np, | |||
173 | return NULL; | 173 | return NULL; |
174 | 174 | ||
175 | read_lock(&devtree_lock); | 175 | read_lock(&devtree_lock); |
176 | for (pp = np->properties; pp != 0; pp = pp->next) { | 176 | for (pp = np->properties; pp; pp = pp->next) { |
177 | if (of_prop_cmp(pp->name, name) == 0) { | 177 | if (of_prop_cmp(pp->name, name) == 0) { |
178 | if (lenp != 0) | 178 | if (lenp) |
179 | *lenp = pp->length; | 179 | *lenp = pp->length; |
180 | break; | 180 | break; |
181 | } | 181 | } |
@@ -497,7 +497,7 @@ struct device_node *of_find_node_with_property(struct device_node *from, | |||
497 | read_lock(&devtree_lock); | 497 | read_lock(&devtree_lock); |
498 | np = from ? from->allnext : allnodes; | 498 | np = from ? from->allnext : allnodes; |
499 | for (; np; np = np->allnext) { | 499 | for (; np; np = np->allnext) { |
500 | for (pp = np->properties; pp != 0; pp = pp->next) { | 500 | for (pp = np->properties; pp; pp = pp->next) { |
501 | if (of_prop_cmp(pp->name, prop_name) == 0) { | 501 | if (of_prop_cmp(pp->name, prop_name) == 0) { |
502 | of_node_get(np); | 502 | of_node_get(np); |
503 | goto out; | 503 | goto out; |
@@ -902,7 +902,7 @@ int of_parse_phandle_with_args(struct device_node *np, const char *list_name, | |||
902 | /* Retrieve the phandle list property */ | 902 | /* Retrieve the phandle list property */ |
903 | list = of_get_property(np, list_name, &size); | 903 | list = of_get_property(np, list_name, &size); |
904 | if (!list) | 904 | if (!list) |
905 | return -EINVAL; | 905 | return -ENOENT; |
906 | list_end = list + size / sizeof(*list); | 906 | list_end = list + size / sizeof(*list); |
907 | 907 | ||
908 | /* Loop over the phandles until all the requested entry is found */ | 908 | /* Loop over the phandles until all the requested entry is found */ |
@@ -1180,7 +1180,7 @@ static void of_alias_add(struct alias_prop *ap, struct device_node *np, | |||
1180 | ap->stem[stem_len] = 0; | 1180 | ap->stem[stem_len] = 0; |
1181 | list_add_tail(&ap->link, &aliases_lookup); | 1181 | list_add_tail(&ap->link, &aliases_lookup); |
1182 | pr_debug("adding DT alias:%s: stem=%s id=%i node=%s\n", | 1182 | pr_debug("adding DT alias:%s: stem=%s id=%i node=%s\n", |
1183 | ap->alias, ap->stem, ap->id, np ? np->full_name : NULL); | 1183 | ap->alias, ap->stem, ap->id, of_node_full_name(np)); |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | /** | 1186 | /** |
diff --git a/drivers/of/irq.c b/drivers/of/irq.c index 9cf00602f566..ff8ab7b27373 100644 --- a/drivers/of/irq.c +++ b/drivers/of/irq.c | |||
@@ -255,7 +255,7 @@ int of_irq_map_raw(struct device_node *parent, const __be32 *intspec, | |||
255 | 255 | ||
256 | skiplevel: | 256 | skiplevel: |
257 | /* Iterate again with new parent */ | 257 | /* Iterate again with new parent */ |
258 | pr_debug(" -> new parent: %s\n", newpar ? newpar->full_name : "<>"); | 258 | pr_debug(" -> new parent: %s\n", of_node_full_name(newpar)); |
259 | of_node_put(ipar); | 259 | of_node_put(ipar); |
260 | ipar = newpar; | 260 | ipar = newpar; |
261 | newpar = NULL; | 261 | newpar = NULL; |
diff --git a/drivers/of/of_mtd.c b/drivers/of/of_mtd.c index e7cad627a5d1..a27ec94877e4 100644 --- a/drivers/of/of_mtd.c +++ b/drivers/of/of_mtd.c | |||
@@ -32,7 +32,7 @@ static const char *nand_ecc_modes[] = { | |||
32 | * The function gets ecc mode string from property 'nand-ecc-mode', | 32 | * The function gets ecc mode string from property 'nand-ecc-mode', |
33 | * and return its index in nand_ecc_modes table, or errno in error case. | 33 | * and return its index in nand_ecc_modes table, or errno in error case. |
34 | */ | 34 | */ |
35 | const int of_get_nand_ecc_mode(struct device_node *np) | 35 | int of_get_nand_ecc_mode(struct device_node *np) |
36 | { | 36 | { |
37 | const char *pm; | 37 | const char *pm; |
38 | int err, i; | 38 | int err, i; |