Commit d4f9afb2 authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Herbert Xu

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: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent abc6146a
...@@ -263,15 +263,9 @@ static int zip_probe(struct pci_dev *pdev, const struct pci_device_id *ent) ...@@ -263,15 +263,9 @@ static int zip_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
goto err_disable_device; 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) { if (err) {
dev_err(dev, "Unable to get usable DMA configuration\n"); dev_err(dev, "Unable to get usable 48-bit 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");
goto err_release_regions; goto err_release_regions;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment