Prefer the higher-level platform_device_set_fwnode() over the
OF-specific platform_device_set_of_node() for dynamically allocated
platform devices.

Signed-off-by: Bartosz Golaszewski <[email protected]>
---
 drivers/pmdomain/imx/gpc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c
index 
abca5f449a226fbae4213926e1395c413160c950..c147eaf048ba2b79a744ec87029420981581e48e
 100644
--- a/drivers/pmdomain/imx/gpc.c
+++ b/drivers/pmdomain/imx/gpc.c
@@ -487,7 +487,7 @@ static int imx_gpc_probe(struct platform_device *pdev)
                        domain->ipg_rate_mhz = ipg_rate_mhz;
 
                        pd_pdev->dev.parent = &pdev->dev;
-                       platform_device_set_of_node(pd_pdev, np);
+                       platform_device_set_fwnode(pd_pdev, 
of_fwnode_handle(np));
 
                        ret = platform_device_add(pd_pdev);
                        if (ret) {

-- 
2.47.3


Reply via email to