From 6261c7cde02c0d4b52b68e751df1309dc4893eaf Mon Sep 17 00:00:00 2001 From: Bartosz Golaszewski Date: Mon, 6 Jul 2026 14:44:18 +0200 Subject: [PATCH] of: platform: use platform_device_set_of_node() Ahead of reworking the reference counting logic for platform devices, encapsulate the assignment of the OF node for dynamically allocated platform devices with the provided helper. Acked-by: Rob Herring (Arm) Reviewed-by: Andy Shevchenko Signed-off-by: Bartosz Golaszewski Link: https://patch.msgid.link/20260706-pdev-fwnode-ref-v3-6-1ff028e33779@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman --- drivers/of/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/platform.c b/drivers/of/platform.c index 53bca8c6f781..8b1e76407782 100644 --- a/drivers/of/platform.c +++ b/drivers/of/platform.c @@ -126,7 +126,7 @@ struct platform_device *of_device_alloc(struct device_node *np, } /* setup generic device info */ - device_set_node(&dev->dev, of_fwnode_handle(of_node_get(np))); + platform_device_set_of_node(dev, np); dev->dev.parent = parent ? : &platform_bus; if (bus_id)