drivers:net: Convert dma_alloc_coherent(...__GFP_ZERO) to dma_zalloc_coherent
[deliverable/linux.git] / drivers / net / ethernet / xilinx / ll_temac_main.c
index 57c2e5ef2804ec5a89841557bb4e867c11cde5ec..b88121f240ca609ea26f911508b829c8fbbdbdd1 100644 (file)
@@ -243,15 +243,15 @@ static int temac_dma_bd_init(struct net_device *ndev)
 
        /* allocate the tx and rx ring buffer descriptors. */
        /* returns a virtual address and a physical address. */
-       lp->tx_bd_v = dma_alloc_coherent(ndev->dev.parent,
-                                        sizeof(*lp->tx_bd_v) * TX_BD_NUM,
-                                        &lp->tx_bd_p, GFP_KERNEL | __GFP_ZERO);
+       lp->tx_bd_v = dma_zalloc_coherent(ndev->dev.parent,
+                                         sizeof(*lp->tx_bd_v) * TX_BD_NUM,
+                                         &lp->tx_bd_p, GFP_KERNEL);
        if (!lp->tx_bd_v)
                goto out;
 
-       lp->rx_bd_v = dma_alloc_coherent(ndev->dev.parent,
-                                        sizeof(*lp->rx_bd_v) * RX_BD_NUM,
-                                        &lp->rx_bd_p, GFP_KERNEL | __GFP_ZERO);
+       lp->rx_bd_v = dma_zalloc_coherent(ndev->dev.parent,
+                                         sizeof(*lp->rx_bd_v) * RX_BD_NUM,
+                                         &lp->rx_bd_p, GFP_KERNEL);
        if (!lp->rx_bd_v)
                goto out;
 
@@ -1007,7 +1007,7 @@ static int temac_of_probe(struct platform_device *op)
                return -ENOMEM;
 
        ether_setup(ndev);
-       dev_set_drvdata(&op->dev, ndev);
+       platform_set_drvdata(op, ndev);
        SET_NETDEV_DEV(ndev, &op->dev);
        ndev->flags &= ~IFF_MULTICAST;  /* clear multicast */
        ndev->features = NETIF_F_SG | NETIF_F_FRAGLIST;
@@ -1136,7 +1136,7 @@ static int temac_of_probe(struct platform_device *op)
 
 static int temac_of_remove(struct platform_device *op)
 {
-       struct net_device *ndev = dev_get_drvdata(&op->dev);
+       struct net_device *ndev = platform_get_drvdata(op);
        struct temac_local *lp = netdev_priv(ndev);
 
        temac_mdio_teardown(lp);
@@ -1145,7 +1145,6 @@ static int temac_of_remove(struct platform_device *op)
        if (lp->phy_node)
                of_node_put(lp->phy_node);
        lp->phy_node = NULL;
-       dev_set_drvdata(&op->dev, NULL);
        iounmap(lp->regs);
        if (lp->sdma_regs)
                iounmap(lp->sdma_regs);
This page took 0.026698 seconds and 5 git commands to generate.