dt: reform for_each_property to for_each_property_of_node
Make this macro easier to use(do not need to pass properties, a node is enough), also change to a more sensible name as for_each_child_of_node. Signed-off-by: Dong Aisheng <dong.aisheng@linaro.org> Cc: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <rob.herring@calxeda.com>
This commit is contained in:
parent
7b482c8360
commit
8af0da93da
|
@ -1157,7 +1157,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align))
|
||||||
if (!of_aliases)
|
if (!of_aliases)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for_each_property(pp, of_aliases->properties) {
|
for_each_property_of_node(of_aliases, pp) {
|
||||||
const char *start = pp->name;
|
const char *start = pp->name;
|
||||||
const char *end = start + strlen(start);
|
const char *end = start + strlen(start);
|
||||||
struct device_node *np;
|
struct device_node *np;
|
||||||
|
|
|
@ -219,8 +219,8 @@ extern int of_device_is_available(const struct device_node *device);
|
||||||
extern const void *of_get_property(const struct device_node *node,
|
extern const void *of_get_property(const struct device_node *node,
|
||||||
const char *name,
|
const char *name,
|
||||||
int *lenp);
|
int *lenp);
|
||||||
#define for_each_property(pp, properties) \
|
#define for_each_property_of_node(dn, pp) \
|
||||||
for (pp = properties; pp != NULL; pp = pp->next)
|
for (pp = dn->properties; pp != NULL; pp = pp->next)
|
||||||
|
|
||||||
extern int of_n_addr_cells(struct device_node *np);
|
extern int of_n_addr_cells(struct device_node *np);
|
||||||
extern int of_n_size_cells(struct device_node *np);
|
extern int of_n_size_cells(struct device_node *np);
|
||||||
|
|
Loading…
Reference in New Issue