summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/lantiq_etop.c
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2016-12-08 20:41:24 +0100
committerDavid S. Miller <davem@davemloft.net>2016-12-09 03:26:58 +0100
commit9cecb138e54c54989375bceeb448affcdf03497f (patch)
treed3c2240b88ce4a2f9b2b196588bfc1bd6ecb1ef3 /drivers/net/ethernet/lantiq_etop.c
parentvhost-vsock: fix orphan connection reset (diff)
downloadlinux-9cecb138e54c54989375bceeb448affcdf03497f.tar.xz
linux-9cecb138e54c54989375bceeb448affcdf03497f.zip
net: ethernet: lantiq_etop: Call SET_NETDEV_DEV()
The Lantiq Etop 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/net/ethernet/lantiq_etop.c')
-rw-r--r--drivers/net/ethernet/lantiq_etop.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 91e09d68b7e2..a167fd7ee13e 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -704,6 +704,7 @@ ltq_etop_probe(struct platform_device *pdev)
priv->pldata = dev_get_platdata(&pdev->dev);
priv->netdev = dev;
spin_lock_init(&priv->lock);
+ SET_NETDEV_DEV(dev, &pdev->dev);
for (i = 0; i < MAX_DMA_CHAN; i++) {
if (IS_TX(i))