Skip to content

Commit

Permalink
crypto: ccp - Use dma_set_mask_and_coherent to set DMA mask
Browse files Browse the repository at this point in the history
Replace the setting of the DMA masks with the dma_set_mask_and_coherent
function call.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Tom Lendacky authored and Herbert Xu committed Feb 27, 2015
1 parent a5bd093 commit 261bf07
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/crypto/ccp/ccp-platform.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,11 @@ static int ccp_platform_probe(struct platform_device *pdev)

if (!dev->dma_mask)
dev->dma_mask = &dev->coherent_dma_mask;
*(dev->dma_mask) = DMA_BIT_MASK(48);
dev->coherent_dma_mask = DMA_BIT_MASK(48);
ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48));
if (ret) {
dev_err(dev, "dma_set_mask_and_coherent failed (%d)\n", ret);
goto e_free;
}

if (of_property_read_bool(dev->of_node, "dma-coherent"))
ccp->axcache = CACHE_WB_NO_ALLOC;
Expand Down

0 comments on commit 261bf07

Please sign in to comment.