Thread (9 messages) 9 messages, 4 authors, 2023-02-22

Re: [PATCH v3 3/4] soc: imx: imx8m-blk-ctrl: Scan subnodes and bind drivers to them

From: Marek Vasut <marex@denx.de>
Date: 2023-02-21 18:57:55
Also in: linux-devicetree

On 2/21/23 18:09, Lucas Stach wrote:

[...]
quoted
@@ -310,6 +312,13 @@ static int imx8m_blk_ctrl_probe(struct platform_device *pdev)
  
  	dev_set_drvdata(dev, bc);
  
+	for_each_child_of_node(dev->of_node, np) {
+		child = of_platform_device_create(np, NULL, dev);
+		if (child)
+			continue;
+		dev_warn(dev, "failed to create device for %pOF\n", np);
+	}
Any reason for not using devm_of_platform_populate() instead?
Yes, lack of awareness of that option.

Do I read it right that this gets rid of the whole loop implementation 
here and replaces it with single function call ?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help