]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
net: ethernet: lantiq_etop: Call SET_NETDEV_DEV()
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 8 Dec 2016 19:41:24 +0000 (11:41 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Dec 2016 02:26:58 +0000 (21:26 -0500)
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>
drivers/net/ethernet/lantiq_etop.c

index 91e09d68b7e25ddd720aefdd7a79720e2e02ae4c..a167fd7ee13e0dcb36ce40fa6ba435c1883e348b 100644 (file)
@@ -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))