Skip to content

Commit ecb8c88

Browse files
Wang Qingvinodkoul
authored andcommitted
dmaengine: dw-edma-pcie: 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: Wang Qing <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 4c0eee5 commit ecb8c88

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

drivers/dma/dw-edma/dw-edma-pcie.c

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -186,27 +186,18 @@ static int dw_edma_pcie_probe(struct pci_dev *pdev,
186186
pci_set_master(pdev);
187187

188188
/* DMA configuration */
189-
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(64));
189+
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
190190
if (!err) {
191-
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
192-
if (err) {
193-
pci_err(pdev, "consistent DMA mask 64 set failed\n");
194-
return err;
195-
}
191+
pci_err(pdev, "DMA mask 64 set failed\n");
192+
return err;
196193
} else {
197194
pci_err(pdev, "DMA mask 64 set failed\n");
198195

199-
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
196+
err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
200197
if (err) {
201198
pci_err(pdev, "DMA mask 32 set failed\n");
202199
return err;
203200
}
204-
205-
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
206-
if (err) {
207-
pci_err(pdev, "consistent DMA mask 32 set failed\n");
208-
return err;
209-
}
210201
}
211202

212203
/* Data structure allocation */

0 commit comments

Comments
 (0)