mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-08-28 02:53:16 -04:00
i2c: pxa-pci: 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: Andi Shyti <andi.shyti@kernel.org> Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com> # for I2C 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-8-1ff028e33779@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
002919316d
commit
34934e7cd1
@@ -76,7 +76,8 @@ static struct platform_device *add_i2c_device(struct pci_dev *dev, int bar)
|
||||
goto out;
|
||||
}
|
||||
pdev->dev.parent = &dev->dev;
|
||||
pdev->dev.of_node = child;
|
||||
|
||||
platform_device_set_of_node(pdev, child);
|
||||
|
||||
ret = platform_device_add_resources(pdev, res, ARRAY_SIZE(res));
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user