mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 07:29:12 -04:00
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: ec988ad78e ("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>
This commit is contained in:
committed by
David S. Miller
parent
9cecb138e5
commit
5579f28cc8
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user