Skip to content

Commit c726c62

Browse files
Qing Wangvinodkoul
authored andcommitted
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 <[email protected]> Reviewed-by: Logan Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 0c5afef commit c726c62

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

drivers/dma/plx_dma.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -563,15 +563,9 @@ static int plx_dma_probe(struct pci_dev *pdev,
563563
if (rc)
564564
return rc;
565565

566-
rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(48));
566+
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
567567
if (rc)
568-
rc = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
569-
if (rc)
570-
return rc;
571-
572-
rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
573-
if (rc)
574-
rc = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
568+
rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
575569
if (rc)
576570
return rc;
577571

0 commit comments

Comments
 (0)