diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-05 15:45:54 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-09-11 21:43:58 -0600 |
commit | 3991f42ed2e38aff28ba3c24369bfbd90620bea7 (patch) | |
tree | 4e91056bedde884d7bec42bf45a32e6a1fcd01e0 /drivers/misc | |
parent | 8639f69a61b47971dba47ab5ed72e47436729bb1 (diff) | |
download | u-boot-3991f42ed2e38aff28ba3c24369bfbd90620bea7.tar.gz |
dm: core: Add ofnode_for_each_subnode()
Add a convenience macro to iterate over subnodes of a node. Make use of
this where appropriate in the code.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/cros_ec.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/misc/cros_ec.c b/drivers/misc/cros_ec.c index feaa5d8567..eefaaa53ad 100644 --- a/drivers/misc/cros_ec.c +++ b/drivers/misc/cros_ec.c @@ -1038,8 +1038,7 @@ int cros_ec_decode_ec_flash(struct udevice *dev, struct fdt_cros_ec *config) config->flash_erase_value = ofnode_read_s32_default(flash_node, "erase-value", -1); - for (node = ofnode_first_subnode(flash_node); ofnode_valid(node); - node = ofnode_next_subnode(node)) { + ofnode_for_each_subnode(node, flash_node) { const char *name = ofnode_get_name(node); enum ec_flash_region region; |