Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6
devicetree/next changes queued for v3.3 merge window * tag 'devicetree-for-linus-20120104' of git://git.secretlab.ca/git/linux-2.6: ARM: prom.h: Fix build error by removing unneeded header file irq: check domain hwirq range for DT translate dt: add empty of_get_node/of_put_node functions of/pdt: fix section mismatch warning i2c-designware: add OF binding support dt/i2c: Enumerate some of the known trivial i2c devices dt: reform for_each_property to for_each_property_of_node ARM/of: allow *machine_desc.dt_compat to be const of/base: Take NULL string into account for property with multiple strings OF/device-tree: Add some entries to vendor-prefixes.txt Fix up trivial add-add conflicts in include/linux/of.h
This commit is contained in:
@@ -752,7 +752,7 @@ int of_property_read_string_index(struct device_node *np, const char *propname,
|
||||
|
||||
for (i = 0; total < prop->length; total += l, p += l) {
|
||||
l = strlen(p) + 1;
|
||||
if ((*p != 0) && (i++ == index)) {
|
||||
if (i++ == index) {
|
||||
*output = p;
|
||||
return 0;
|
||||
}
|
||||
@@ -790,11 +790,9 @@ int of_property_count_strings(struct device_node *np, const char *propname)
|
||||
|
||||
p = prop->value;
|
||||
|
||||
for (i = 0; total < prop->length; total += l, p += l) {
|
||||
for (i = 0; total < prop->length; total += l, p += l, i++)
|
||||
l = strlen(p) + 1;
|
||||
if (*p != 0)
|
||||
i++;
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(of_property_count_strings);
|
||||
@@ -1163,7 +1161,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
|
||||
if (!of_aliases)
|
||||
return;
|
||||
|
||||
for_each_property(pp, of_aliases->properties) {
|
||||
for_each_property_of_node(of_aliases, pp) {
|
||||
const char *start = pp->name;
|
||||
const char *end = start + strlen(start);
|
||||
struct device_node *np;
|
||||
|
Reference in New Issue
Block a user