mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-30 22:03:17 +01:00
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: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]>
This commit is contained in:
1 parent
f6ae541cc3
commit
23a641d5c2
1 file changed
+3
-7
@@ -383,13 +383,9 @@ 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);
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
ret = devm_of_platform_populate(dev);
|
||||
if (ret)
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in new issue
Block a user