Skip to content

Commit

Permalink
net: ethernet: cpmac: Call SET_NETDEV_DEV()
Browse files Browse the repository at this point in the history
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: ec988ad ("phy: Don't increment MDIO bus refcount unless it's a different owner")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
ffainelli authored and davem330 committed Dec 9, 2016
1 parent 9cecb13 commit 5579f28
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/ti/cpmac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 5579f28

Please sign in to comment.