diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2016-12-08 11:41:25 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-12-08 21:26:58 -0500 |
commit | 5579f28cc8ba8a3b489cb042fcb30d331236c3bb (patch) | |
tree | 5d78835b264a00ab13a5911f88ccd944d13d9caa /drivers | |
parent | 9cecb138e54c54989375bceeb448affcdf03497f (diff) | |
download | linux-5579f28cc8ba8a3b489cb042fcb30d331236c3bb.tar.bz2 |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/ti/cpmac.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c index fa0cfda24fd9..28097be2ff28 100644 --- a/drivers/net/ethernet/ti/cpmac.c +++ b/drivers/net/ethernet/ti/cpmac.c @@ -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); |