mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 20:54:03 +02:00
usb: chipidea: use platform_device_set_of_node_from_dev()
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 <peter.chen@kernel.org> Link: https://lore.kernel.org/r/20211215225646.1997946-1-robh@kernel.org Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://patch.msgid.link/20260706-pdev-fwnode-ref-v3-17-1ff028e33779@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5963c8563d
commit
7afe78d6da
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user