diff mbox series

powerpc: chrp: Use of_node_is_type to access device_type

Message ID 20190118143529.13347-1-robh@kernel.org
State Accepted
Commit 75a080cde08d2dcba19ee864f9732094d93fab41
Headers show
Series powerpc: chrp: Use of_node_is_type to access device_type | expand

Commit Message

Rob Herring Jan. 18, 2019, 2:35 p.m. UTC
Commit 8ce5f8415753 ("of: Remove struct device_node.type pointer")
removed struct device_node.type pointer, but the conversion to use
of_node_is_type() accessor was missed in chrp_init_IRQ().

Fixes: 8ce5f8415753 ("of: Remove struct device_node.type pointer")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
Signed-off-by: Rob Herring <robh@kernel.org>

---
Michael, I see you just sent a PR of fixes. I can send this to Linus if 
you prefer.

 arch/powerpc/platforms/chrp/setup.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.19.1

Comments

Michael Ellerman Jan. 19, 2019, 10:41 a.m. UTC | #1
Rob Herring <robh@kernel.org> writes:
> Commit 8ce5f8415753 ("of: Remove struct device_node.type pointer")

> removed struct device_node.type pointer, but the conversion to use

> of_node_is_type() accessor was missed in chrp_init_IRQ().

>

> Fixes: 8ce5f8415753 ("of: Remove struct device_node.type pointer")

> Reported-by: kbuild test robot <lkp@intel.com>

> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>

> Cc: Paul Mackerras <paulus@samba.org>

> Cc: Michael Ellerman <mpe@ellerman.id.au>

> Cc: linuxppc-dev@lists.ozlabs.org

> Signed-off-by: Rob Herring <robh@kernel.org>

> ---

> Michael, I see you just sent a PR of fixes. I can send this to Linus if 

> you prefer.


Yeah if you're happy to, thanks.

Acked-by: Michael Ellerman <mpe@ellerman.id.au>


cheers
diff mbox series

Patch

diff --git a/arch/powerpc/platforms/chrp/setup.c b/arch/powerpc/platforms/chrp/setup.c
index e66644e0fb40..9438fa0fc355 100644
--- a/arch/powerpc/platforms/chrp/setup.c
+++ b/arch/powerpc/platforms/chrp/setup.c
@@ -538,8 +538,7 @@  static void __init chrp_init_IRQ(void)
 	/* see if there is a keyboard in the device tree
 	   with a parent of type "adb" */
 	for_each_node_by_name(kbd, "keyboard")
-		if (kbd->parent && kbd->parent->type
-		    && strcmp(kbd->parent->type, "adb") == 0)
+		if (of_node_is_type(kbd->parent, "adb"))
 			break;
 	of_node_put(kbd);
 	if (kbd)