[PATCHv2 net-next 3/6] net: gianfar: assign ofdev to priv struct

Rosen Penev posted 6 patches 3 days ago
[PATCHv2 net-next 3/6] net: gianfar: assign ofdev to priv struct
Posted by Rosen Penev 3 days ago
This is done in probe but not of_init. This will be used for further
devm conversions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/ethernet/freescale/gianfar.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/freescale/gianfar.c b/drivers/net/ethernet/freescale/gianfar.c
index 9ff756130ba8..4b023beaa0b1 100644
--- a/drivers/net/ethernet/freescale/gianfar.c
+++ b/drivers/net/ethernet/freescale/gianfar.c
@@ -687,6 +687,8 @@ static int gfar_of_init(struct platform_device *ofdev, struct net_device **pdev)
 
 	priv = netdev_priv(dev);
 	priv->ndev = dev;
+	priv->ofdev = ofdev;
+	priv->dev = &ofdev->dev;
 
 	priv->mode = mode;
 
-- 
2.47.0