From: Florian Fainelli <f.faine...@gmail.com> Date: Fri, 18 Aug 2017 17:12:55 -0700
> @@ -623,6 +623,8 @@ static struct platform_device *dpaa_eth_add_device(int > fman_id, > goto no_mem; > } > > + pdev->dev.of_node = node; > + pdev->dev.parent = priv->dev; > set_dma_ops(&pdev->dev, get_dma_ops(priv->dev)); > > ret = platform_device_add_data(pdev, &data, sizeof(data)); I guess since we allocate and manage the platform device here, we can fumble around safely with it's device node pointer and parent. So this should be ok.