sgiseeq: switch to dma_alloc_attrs
authorChristoph Hellwig <hch@lst.de>
Wed, 14 Jun 2017 08:27:43 +0000 (10:27 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 29 Aug 2017 08:02:54 +0000 (10:02 +0200)
Use dma_alloc_attrs directly instead of the dma_alloc_noncoherent wrapper.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Acked-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/seeq/sgiseeq.c

index 70347720fdf98a7d54204f8bcda60f4024332f64..573691bc3b71fb31390dc33c071599a2e83c0ad9 100644 (file)
@@ -737,8 +737,8 @@ static int sgiseeq_probe(struct platform_device *pdev)
        sp = netdev_priv(dev);
 
        /* Make private data page aligned */
-       sr = dma_alloc_noncoherent(&pdev->dev, sizeof(*sp->srings),
-                               &sp->srings_dma, GFP_KERNEL);
+       sr = dma_alloc_attrs(&pdev->dev, sizeof(*sp->srings), &sp->srings_dma,
+                            GFP_KERNEL, DMA_ATTR_NON_CONSISTENT);
        if (!sr) {
                printk(KERN_ERR "Sgiseeq: Page alloc failed, aborting.\n");
                err = -ENOMEM;
@@ -813,8 +813,8 @@ static int sgiseeq_remove(struct platform_device *pdev)
        struct sgiseeq_private *sp = netdev_priv(dev);
 
        unregister_netdev(dev);
-       dma_free_noncoherent(&pdev->dev, sizeof(*sp->srings), sp->srings,
-                            sp->srings_dma);
+       dma_free_attrs(&pdev->dev, sizeof(*sp->srings), sp->srings,
+                      sp->srings_dma, DMA_ATTR_NON_CONSISTENT);
        free_netdev(dev);
 
        return 0;