mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-27 21:03:31 -04:00
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) <robh@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260706-pdev-fwnode-ref-v3-6-1ff028e33779@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
67e1ddc9f7
commit
6261c7cde0
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user