]> git.sur5r.net Git - u-boot/commitdiff
dm: ofnode: use ofnode_read_bool() to check property existence
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Thu, 22 Jun 2017 07:54:03 +0000 (16:54 +0900)
committerSimon Glass <sjg@chromium.org>
Tue, 11 Jul 2017 16:08:20 +0000 (10:08 -0600)
This will clarify the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/core/ofnode.c

index da7c477c81db224687027557e0805e8012483606..98c1186eff986a5ed4878042e3f231fe5d86fe7e 100644 (file)
@@ -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