mirror of https://gitee.com/openkylin/linux.git
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>
This commit is contained in:
parent
5b394b2ddf
commit
f55f61225a
|
@ -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? */
|
||||
|
|
Loading…
Reference in New Issue