Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: ec988ad78ed6 ("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>

authored by

Florian Fainelli and committed by
David S. Miller
5579f28c 9cecb138

+1
+1
drivers/net/ethernet/ti/cpmac.c
··· 1113 1113 if (!dev) 1114 1114 return -ENOMEM; 1115 1115 1116 + SET_NETDEV_DEV(dev, &pdev->dev); 1116 1117 platform_set_drvdata(pdev, dev); 1117 1118 priv = netdev_priv(dev); 1118 1119