diff options
author | Tom Lendacky <thomas.lendacky@amd.com> | 2015-02-03 14:07:17 -0500 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2015-02-27 04:48:48 -0500 |
commit | 261bf074899a1a4624d8a0c6bfae3e92d12ef19f (patch) | |
tree | 9927c2f1dd38835fc503c1a8793f3a65df4f3238 | |
parent | a5bd093af0d11611b765d3cbd354e0a39975caab (diff) |
crypto: ccp - Use dma_set_mask_and_coherent to set DMA mask
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>
-rw-r--r-- | drivers/crypto/ccp/ccp-platform.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/crypto/ccp/ccp-platform.c b/drivers/crypto/ccp/ccp-platform.c index 9e09c5023b5f..04265a3c3608 100644 --- a/drivers/crypto/ccp/ccp-platform.c +++ b/drivers/crypto/ccp/ccp-platform.c | |||
@@ -109,8 +109,11 @@ static int ccp_platform_probe(struct platform_device *pdev) | |||
109 | 109 | ||
110 | if (!dev->dma_mask) | 110 | if (!dev->dma_mask) |
111 | dev->dma_mask = &dev->coherent_dma_mask; | 111 | dev->dma_mask = &dev->coherent_dma_mask; |
112 | *(dev->dma_mask) = DMA_BIT_MASK(48); | 112 | ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(48)); |
113 | dev->coherent_dma_mask = DMA_BIT_MASK(48); | 113 | if (ret) { |
114 | dev_err(dev, "dma_set_mask_and_coherent failed (%d)\n", ret); | ||
115 | goto e_free; | ||
116 | } | ||
114 | 117 | ||
115 | if (of_property_read_bool(dev->of_node, "dma-coherent")) | 118 | if (of_property_read_bool(dev->of_node, "dma-coherent")) |
116 | ccp->axcache = CACHE_WB_NO_ALLOC; | 119 | ccp->axcache = CACHE_WB_NO_ALLOC; |