]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
crypto: ccp - Remove manual check and set of dma_mask pointer
authorTom Lendacky <thomas.lendacky@amd.com>
Tue, 26 May 2015 18:06:24 +0000 (13:06 -0500)
committerHerbert Xu <herbert@gondor.apana.org.au>
Wed, 27 May 2015 09:51:54 +0000 (17:51 +0800)
The underlying device support will set the device dma_mask pointer
if DMA is set up properly for the device.  Remove the check for and
assignment of dma_mask when it is null. Instead, just error out if
the dma_set_mask_and_coherent function fails because dma_mask is null.

Signed-off-by: Tom Lendacky <thomas.lendacky@amd.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/ccp/ccp-platform.c

index b1c20b2b564712eb320a0b2eb59d252e14151a1c..c0aa5c5c5f9d1b13d1665a44fe8c284bbcedac28 100644 (file)
@@ -174,8 +174,6 @@ static int ccp_platform_probe(struct platform_device *pdev)
        }
        ccp->io_regs = ccp->io_map;
 
-       if (!dev->dma_mask)
-               dev->dma_mask = &dev->coherent_dma_mask;
        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);