Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5579f28c authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

net: ethernet: cpmac: Call SET_NETDEV_DEV()



The TI CPMAC driver calls into PHYLIB which now checks for
net_device->dev.parent, so make sure we do set it before calling into
any MDIO/PHYLIB related function.

Fixes: ec988ad7 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9cecb138
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1113,6 +1113,7 @@ static int cpmac_probe(struct platform_device *pdev)
	if (!dev)
		return -ENOMEM;

	SET_NETDEV_DEV(dev, &pdev->dev);
	platform_set_drvdata(pdev, dev);
	priv = netdev_priv(dev);