Skip to content

Commit 5579f28

Browse files
ffainellidavem330
authored andcommitted
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: ec988ad ("phy: Don't increment MDIO bus refcount unless it's a different owner") Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 9cecb13 commit 5579f28

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/net/ethernet/ti/cpmac.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,6 +1113,7 @@ static int cpmac_probe(struct platform_device *pdev)
11131113
if (!dev)
11141114
return -ENOMEM;
11151115

1116+
SET_NETDEV_DEV(dev, &pdev->dev);
11161117
platform_set_drvdata(pdev, dev);
11171118
priv = netdev_priv(dev);
11181119

0 commit comments

Comments
 (0)