Commit 23a641d5 authored by Bartosz Golaszewski's avatar Bartosz Golaszewski Committed by Krzysztof Kozlowski

memory: ti-aemif: don't needlessly iterate over child nodes

When populating devices from a specific node, we don't need to call
of_platform_populate() for every child node manually - the routine
will already do it. We can call it directly from the platform device's
OF node. While at it: use the managed variant of of_platform_populate().
Signed-off-by: default avatarBartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240809-ti-aemif-v1-3-27b1e5001390@linaro.orgSigned-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
parent f6ae541c
......@@ -383,14 +383,10 @@ static int aemif_probe(struct platform_device *pdev)
* child will be probed after the AEMIF timing parameters are set.
*/
if (np) {
for_each_available_child_of_node(np, child_np) {
ret = of_platform_populate(child_np, NULL, NULL, dev);
if (ret < 0) {
of_node_put(child_np);
ret = devm_of_platform_populate(dev);
if (ret)
return ret;
}
}
}
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment