This patch adds usefull macro to iterate over a node childs. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> --- TODO: convert all for(...) cycles to this macro. include/linux/of.h | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/of.h b/include/linux/of.h index 5c39b92..a93e2aa 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -46,6 +46,8 @@ extern struct device_node *of_find_node_by_phandle(phandle handle); extern struct device_node *of_get_parent(const struct device_node *node); extern struct device_node *of_get_next_child(const struct device_node *node, struct device_node *prev); +#define for_each_node_child(dn, child) \ + for (child = NULL; (child = of_get_next_child(dn, child)); ) extern struct property *of_find_property(const struct device_node *np, const char *name, int *lenp); -
| Andrew Morton | 2.6.23-rc3-mm1 |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Yinghai Lu | Re: [PATCH RFC] x86: check for and defend against BIOS memory corruption |
| Frederik Deweerdt | [-mm patch] remove tcp header from tcp_v4_check (take #2) |
| David Miller | [GIT]: Networking |
| Jarek Poplawski | Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Herbert Xu | Re: [PATCH 2/3][NET_BATCH] net core use batching |
git: | |
