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

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
...@@ -1113,6 +1113,7 @@ static int cpmac_probe(struct platform_device *pdev) ...@@ -1113,6 +1113,7 @@ static int cpmac_probe(struct platform_device *pdev)
if (!dev) if (!dev)
return -ENOMEM; return -ENOMEM;
SET_NETDEV_DEV(dev, &pdev->dev);
platform_set_drvdata(pdev, dev); platform_set_drvdata(pdev, dev);
priv = netdev_priv(dev); priv = netdev_priv(dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment