summaryrefslogtreecommitdiff
path: root/drivers/crypto/cavium
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2020-11-21 10:31:31 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2020-11-27 09:13:47 +0300
commitd4f9afb23378f50e40cd3bc8aee35679bfd1d27b (patch)
treec13d25e44d25a6a7e40ead54453ff9ff31cb42e5 /drivers/crypto/cavium
parentabc6146aba40ea3b8996773e6ad0e60fd70f7a3f (diff)
downloadlinux-d4f9afb23378f50e40cd3bc8aee35679bfd1d27b.tar.xz
crypto: cavium/zip - Use dma_set_mask_and_coherent to simplify code
'pci_set_dma_mask()' + 'pci_set_consistent_dma_mask()' can be replaced by an equivalent 'dma_set_mask_and_coherent()' which is much less verbose. Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/cavium')
-rw-r--r--drivers/crypto/cavium/zip/zip_main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/crypto/cavium/zip/zip_main.c b/drivers/crypto/cavium/zip/zip_main.c
index d35216e2f6cd..812b4ac9afd6 100644
--- a/drivers/crypto/cavium/zip/zip_main.c
+++ b/drivers/crypto/cavium/zip/zip_main.c
@@ -263,15 +263,9 @@ static int zip_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_disable_device;
}
- err = pci_set_dma_mask(pdev, DMA_BIT_MASK(48));
+ err = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(48));
if (err) {
- dev_err(dev, "Unable to get usable DMA configuration\n");
- goto err_release_regions;
- }
-
- err = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
- if (err) {
- dev_err(dev, "Unable to get 48-bit DMA for allocations\n");
+ dev_err(dev, "Unable to get usable 48-bit DMA configuration\n");
goto err_release_regions;
}