of: Introduce of_for_each_phandle() helper macro
authorJoerg Roedel <jroedel@suse.de>
Mon, 4 Apr 2016 15:49:20 +0000 (17:49 +0200)
committerRob Herring <robh@kernel.org>
Tue, 19 Apr 2016 22:25:14 +0000 (17:25 -0500)
commitf623ce95a51baee6a6638f0b025efc0229a9ac0d
treea54f340319d4a3b5968263367da290c1a396b9f8
parent2021bd01ffccf2728a591070008d7de5bc41306a
of: Introduce of_for_each_phandle() helper macro

With this macro any user can easily iterate over a list of
phandles. The patch also converts __of_parse_phandle_with_args()
to make use of the macro.

The of_count_phandle_with_args() function is not converted,
because the macro hides the return value of of_phandle_iterator_init(),
which is needed in there.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/base.c
include/linux/of.h