Ahead of reworking the reference counting logic for platform devices, encapsulate the assignment of the OF node from another device for dynamically allocated platform devices with the provided helper. Acked-by: Peter Chen Link: https://lore.kernel.org/r/20211215225646.1997946-1-robh@kernel.org Signed-off-by: Bartosz Golaszewski --- drivers/usb/chipidea/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 07563be0013f4d28ed6318a0751670ccef01d0a5..7edc512cc37dc24551efe5fca172777a0a4b0766 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -879,7 +879,7 @@ struct platform_device *ci_hdrc_add_device(struct device *dev, } pdev->dev.parent = dev; - device_set_of_node_from_dev(&pdev->dev, dev); + platform_device_set_of_node_from_dev(pdev, dev); ret = platform_device_add_resources(pdev, res, nres); if (ret) -- 2.47.3