Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: fsl/qe: Use of_get_child_by_name helper

Use the of_get_child_by_name() helper instead of open coding searching
for the 'firmware' child node. This removes directly accessing the name
pointer as well.

Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Li Yang <leoyang.li@nxp.com>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Qiang Zhao <qiang.zhao@nxp.com>
Signed-off-by: Li Yang <leoyang.li@nxp.com>

authored by

Rob Herring and committed by
Li Yang
f55f6122 5b394b2d

+1 -5
+1 -5
drivers/soc/fsl/qe/qe.c
··· 588 588 } 589 589 590 590 /* Find the 'firmware' child node */ 591 - for_each_child_of_node(qe, fw) { 592 - if (strcmp(fw->name, "firmware") == 0) 593 - break; 594 - } 595 - 591 + fw = of_get_child_by_name(qe, "firmware"); 596 592 of_node_put(qe); 597 593 598 594 /* Did we find the 'firmware' node? */