Skip to content

Commit 8c15567

Browse files
tititiou36Christoph Hellwig
authored andcommitted
rapidio/tsi721: Remove usage of the deprecated "pci-dma-compat.h" API
In [1], Christoph Hellwig has proposed to remove the wrappers in include/linux/pci-dma-compat.h. Some reasons why this API should be removed have been given by Julia Lawall in [2]. A coccinelle script has been used to perform the needed transformation. It can be found in [3]. [1]: https://lore.kernel.org/kernel-janitors/[email protected]/ [2]: https://lore.kernel.org/kernel-janitors/alpine.DEB.2.22.394.2007120902170.2424@hadrien/ [3]: https://lore.kernel.org/kernel-janitors/[email protected]/ Signed-off-by: Christophe JAILLET <[email protected]> Reviewed-by: Arnd Bergmann <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 0fb3436 commit 8c15567

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/rapidio/devices/tsi721.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2836,17 +2836,17 @@ static int tsi721_probe(struct pci_dev *pdev,
28362836
}
28372837

28382838
/* Configure DMA attributes. */
2839-
if (pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
2840-
err = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
2839+
if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(64))) {
2840+
err = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32));
28412841
if (err) {
28422842
tsi_err(&pdev->dev, "Unable to set DMA mask");
28432843
goto err_unmap_bars;
28442844
}
28452845

2846-
if (pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)))
2846+
if (dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)))
28472847
tsi_info(&pdev->dev, "Unable to set consistent DMA mask");
28482848
} else {
2849-
err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
2849+
err = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
28502850
if (err)
28512851
tsi_info(&pdev->dev, "Unable to set consistent DMA mask");
28522852
}

0 commit comments

Comments
 (0)