mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-09-18 23:09:29 +02:00
mfd: tps6586: 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: Lee Jones <lee@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-12-1ff028e33779@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b830f5f871
commit
4108b2633d
@@ -397,7 +397,7 @@ static int tps6586x_add_subdevs(struct tps6586x *tps6586x,
|
||||
|
||||
pdev->dev.parent = tps6586x->dev;
|
||||
pdev->dev.platform_data = subdev->platform_data;
|
||||
pdev->dev.of_node = of_node_get(subdev->of_node);
|
||||
platform_device_set_of_node(pdev, subdev->of_node);
|
||||
|
||||
ret = platform_device_add(pdev);
|
||||
if (ret) {
|
||||
|
||||
Reference in New Issue
Block a user