diff mbox series

[1/5] dm: ofnode: use ofnode_read_bool() to check property existence

Message ID 1498118047-11918-1-git-send-email-yamada.masahiro@socionext.com
State Accepted
Commit 252510ac69461c9fc7fa3ec25d655c6f56b0fa93
Headers show
Series [1/5] dm: ofnode: use ofnode_read_bool() to check property existence | expand

Commit Message

Masahiro Yamada June 22, 2017, 7:54 a.m. UTC
This will clarify the code.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 drivers/core/ofnode.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

Comments

Simon Glass July 6, 2017, 4:49 a.m. UTC | #1
On 22 June 2017 at 01:54, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> This will clarify the code.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  drivers/core/ofnode.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>
Simon Glass July 6, 2017, 5:36 p.m. UTC | #2
On 22 June 2017 at 01:54, Masahiro Yamada <yamada.masahiro@socionext.com> wrote:
> This will clarify the code.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
>
>  drivers/core/ofnode.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Acked-by: Simon Glass <sjg@chromium.org>

Applied to u-boot-dm, thanks!
diff mbox series

Patch

diff --git a/drivers/core/ofnode.c b/drivers/core/ofnode.c
index ac312d654654..b8b16bf5e275 100644
--- a/drivers/core/ofnode.c
+++ b/drivers/core/ofnode.c
@@ -556,22 +556,22 @@  int ofnode_read_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