of: provide for_each_matching_node_from
This is for_each_matching_node for a given root similar to the other ..._from functions. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
parent
e1e8656a7d
commit
08dd5af735
|
@ -665,9 +665,11 @@ static inline struct device_node *of_find_matching_node(
|
|||
{
|
||||
return of_find_matching_node_and_match(from, matches, NULL);
|
||||
}
|
||||
#define for_each_matching_node(dn, matches) \
|
||||
for (dn = of_find_matching_node(NULL, matches); dn; \
|
||||
#define for_each_matching_node_from(dn, root, matches) \
|
||||
for (dn = of_find_matching_node(root, matches); dn; \
|
||||
dn = of_find_matching_node(dn, matches))
|
||||
#define for_each_matching_node(dn, matches) \
|
||||
for_each_matching_node_from(dn, NULL, matches)
|
||||
#define for_each_matching_node_and_match(dn, matches, match) \
|
||||
for (dn = of_find_matching_node_and_match(NULL, matches, match); \
|
||||
dn; dn = of_find_matching_node_and_match(dn, matches, match))
|
||||
|
|
Loading…
Reference in New Issue