dt: introduce for_each_available_child_of_node, of_get_next_available_child

Macro for_each_child_of_node() makes it easy to iterate over all of the
children for a given device tree node, including those nodes that are
marked as unavailable (i.e. status = "disabled").

Introduce for_each_available_child_of_node(), which is like
for_each_child_of_node(), but it automatically skips unavailable nodes.
This also requires the introduction of helper function
of_get_next_available_child(), which returns the next available child
node.

Change-Id: I9ea2f76c0359bf27256d61302db9ab0feec86bc6
Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Git-commit: 3296193d1421c2d6f9e49e181cecfd917f0f5764
[mgautam@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2 files changed