diff options
-rw-r--r-- | drivers/of/base.c | 2 | ||||
-rw-r--r-- | include/linux/of.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/of/base.c b/drivers/of/base.c index b7072437eb8c..0181eeb88c92 100644 --- a/drivers/of/base.c +++ b/drivers/of/base.c | |||
@@ -1157,7 +1157,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) | |||
1157 | if (!of_aliases) | 1157 | if (!of_aliases) |
1158 | return; | 1158 | return; |
1159 | 1159 | ||
1160 | for_each_property(pp, of_aliases->properties) { | 1160 | for_each_property_of_node(of_aliases, pp) { |
1161 | const char *start = pp->name; | 1161 | const char *start = pp->name; |
1162 | const char *end = start + strlen(start); | 1162 | const char *end = start + strlen(start); |
1163 | struct device_node *np; | 1163 | struct device_node *np; |
diff --git a/include/linux/of.h b/include/linux/of.h index 4948552d60f5..f1a490c37e06 100644 --- a/include/linux/of.h +++ b/include/linux/of.h | |||
@@ -219,8 +219,8 @@ extern int of_device_is_available(const struct device_node *device); | |||
219 | extern const void *of_get_property(const struct device_node *node, | 219 | extern const void *of_get_property(const struct device_node *node, |
220 | const char *name, | 220 | const char *name, |
221 | int *lenp); | 221 | int *lenp); |
222 | #define for_each_property(pp, properties) \ | 222 | #define for_each_property_of_node(dn, pp) \ |
223 | for (pp = properties; pp != NULL; pp = pp->next) | 223 | for (pp = dn->properties; pp != NULL; pp = pp->next) |
224 | 224 | ||
225 | extern int of_n_addr_cells(struct device_node *np); | 225 | extern int of_n_addr_cells(struct device_node *np); |
226 | extern int of_n_size_cells(struct device_node *np); | 226 | extern int of_n_size_cells(struct device_node *np); |