diff options
author | Masahiro Yamada | 2017-06-22 16:54:03 +0900 |
---|---|---|
committer | Simon Glass | 2017-07-11 10:08:20 -0600 |
commit | 252510ac69461c9fc7fa3ec25d655c6f56b0fa93 (patch) | |
tree | bd881306ca94854ca003382fccc52766e2ddff56 /drivers/core/ofnode.c | |
parent | 766c28a548714a8944e9638a2727157191ff6cca (diff) |
dm: ofnode: use ofnode_read_bool() to check property existence
This will clarify the code.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/core/ofnode.c')
-rw-r--r-- | drivers/core/ofnode.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c index da7c477c81d..98c1186eff9 100644 --- a/drivers/core/ofnode.c +++ b/drivers/core/ofnode.c @@ -582,22 +582,22 @@ int ofnode_read_simple_size_cells(ofnode node) bool ofnode_pre_reloc(ofnode node) { - if (ofnode_read_prop(node, "u-boot,dm-pre-reloc", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-pre-reloc")) return true; #ifdef CONFIG_TPL_BUILD - if (ofnode_read_prop(node, "u-boot,dm-tpl", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-tpl")) return true; #elif defined(CONFIG_SPL_BUILD) - if (ofnode_read_prop(node, "u-boot,dm-spl", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-spl")) return true; #else /* * In regular builds individual spl and tpl handling both * count as handled pre-relocation for later second init. */ - if (ofnode_read_prop(node, "u-boot,dm-spl", NULL) || - ofnode_read_prop(node, "u-boot,dm-tpl", NULL)) + if (ofnode_read_bool(node, "u-boot,dm-spl") || + ofnode_read_bool(node, "u-boot,dm-tpl")) return true; #endif |