diff options
author | Qing Wang <wangqing@vivo.com> | 2021-10-08 05:28:32 +0200 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2021-10-26 07:24:57 +0200 |
commit | c726c62db857d375800af7e82eb1c6f639e87631 (patch) | |
tree | cc27784f35af830673ffe8f71fac50b634e0b80c /drivers/dma/plx_dma.c | |
parent | dmaengine: ioat: switch from 'pci_' to 'dma_' API (diff) | |
download | linux-c726c62db857d375800af7e82eb1c6f639e87631.tar.xz linux-c726c62db857d375800af7e82eb1c6f639e87631.zip |
dmaengine: switch from 'pci_' to 'dma_' API
The wrappers in include/linux/pci-dma-compat.h should go away.
pci_set_dma_mask()/pci_set_consistent_dma_mask() should be
replaced with dma_set_mask()/dma_set_coherent_mask(),
and use dma_set_mask_and_coherent() for both.
Signed-off-by: Qing Wang <wangqing@vivo.com>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Link: https://lore.kernel.org/r/1633663733-47199-7-git-send-email-wangqing@vivo.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma/plx_dma.c')
-rw-r--r-- | drivers/dma/plx_dma.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/dma/plx_dma.c b/drivers/dma/plx_dma.c index 166934544161..1ffcb5ca9788 100644 --- a/drivers/dma/plx_dma.c +++ b/drivers/dma/plx_dma.c @@ -563,15 +563,9 @@ static int plx_dma_probe(struct pci_dev *pdev, if (rc) return rc; - rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(48)); + rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48)); if (rc) - rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); - if (rc) - return rc; - - rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48)); - if (rc) - rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); + rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); if (rc) return rc; |