[PATCH 11/23] i2c: pxa-pci: use platform_device_set_of_node()

From: Bartosz Golaszewski

Date: Thu May 21 2026 - 04:51:03 EST


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.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxxxxxxxx>
---
drivers/i2c/busses/i2c-pxa-pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-pxa-pci.c b/drivers/i2c/busses/i2c-pxa-pci.c
index dbd542300f80043c6bc65a69fa27ca7b3d5fe787..92a0647f08c69f841ca99caca757c1728b3f6fce 100644
--- a/drivers/i2c/busses/i2c-pxa-pci.c
+++ b/drivers/i2c/busses/i2c-pxa-pci.c
@@ -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)

--
2.47.3