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

Marek Vasut marex at denx.de
Tue Feb 21 10:57:47 PST 2023


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

[...]

>> @@ -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 ?



More information about the linux-arm-kernel mailing list