OSDN Git Service

net: pxa168_eth: move SET_NETDEV_DEV a bit earlier
authorJisheng Zhang <jszhang@marvell.com>
Wed, 12 Nov 2014 11:08:47 +0000 (19:08 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 12 Nov 2014 20:07:15 +0000 (15:07 -0500)
This is to ensure the net_device's dev.parent is set before we used it
in dma_zalloc_coherent() from init_hash_table().

Signed-off-by: Jisheng Zhang <jszhang@marvell.com>
Acked-by: Antoine Tenart <antoine.tenart@free-electrons.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/pxa168_eth.c

index 21ddece..38f7cee 100644 (file)
@@ -1540,8 +1540,8 @@ static int pxa168_eth_probe(struct platform_device *pdev)
        if (err)
                goto err_free_mdio;
 
-       pxa168_init_hw(pep);
        SET_NETDEV_DEV(dev, &pdev->dev);
+       pxa168_init_hw(pep);
        err = register_netdev(dev);
        if (err)
                goto err_mdiobus;