Commit 9cecb138 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

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: ec988ad7 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c4587631
...@@ -704,6 +704,7 @@ ltq_etop_probe(struct platform_device *pdev) ...@@ -704,6 +704,7 @@ ltq_etop_probe(struct platform_device *pdev)
priv->pldata = dev_get_platdata(&pdev->dev); priv->pldata = dev_get_platdata(&pdev->dev);
priv->netdev = dev; priv->netdev = dev;
spin_lock_init(&priv->lock); spin_lock_init(&priv->lock);
SET_NETDEV_DEV(dev, &pdev->dev);
for (i = 0; i < MAX_DMA_CHAN; i++) { for (i = 0; i < MAX_DMA_CHAN; i++) {
if (IS_TX(i)) if (IS_TX(i))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment