forcedeth: replace pci_unmap_page with dma_unmap_page
authorZhu Yanjun <yanjun.zhu@oracle.com>
Mon, 20 Nov 2017 03:21:08 +0000 (22:21 -0500)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Nov 2017 20:08:53 +0000 (05:08 +0900)
The function pci_unmap_page is obsolete. So it is replaced with
the function dma_unmap_page.

CC: Srinivas Eeda <srinivas.eeda@oracle.com>
CC: Joe Jin <joe.jin@oracle.com>
CC: Junxiao Bi <junxiao.bi@oracle.com>
Signed-off-by: Zhu Yanjun <yanjun.zhu@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/nvidia/forcedeth.c

index ac8439ceea10affdf7ead137386145cc7cc514d4..481876b5424c9567b6129951aa47f34ed0bee154 100644 (file)
@@ -1986,9 +1986,9 @@ static void nv_unmap_txskb(struct fe_priv *np, struct nv_skb_map *tx_skb)
                                         tx_skb->dma_len,
                                         DMA_TO_DEVICE);
                else
-                       pci_unmap_page(np->pci_dev, tx_skb->dma,
+                       dma_unmap_page(&np->pci_dev->dev, tx_skb->dma,
                                       tx_skb->dma_len,
-                                      PCI_DMA_TODEVICE);
+                                      DMA_TO_DEVICE);
                tx_skb->dma = 0;
        }
 }