Commit f55f6122 authored by Rob Herring's avatar Rob Herring Committed by Li Yang
Browse files

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: default avatarRob Herring <robh@kernel.org>
Acked-by: default avatarQiang Zhao <qiang.zhao@nxp.com>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent 5b394b2d
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -588,11 +588,7 @@ struct qe_firmware_info *qe_get_firmware_info(void)
	}

	/* Find the 'firmware' child node */
	for_each_child_of_node(qe, fw) {
		if (strcmp(fw->name, "firmware") == 0)
			break;
	}

	fw = of_get_child_by_name(qe, "firmware");
	of_node_put(qe);

	/* Did we find the 'firmware' node? */