All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: <linux-crypto@vger.kernel.org>
Cc: Herbert Xu <herbert@gondor.apana.org.au>,
	David Miller <davem@davemloft.net>
Subject: [PATCH v1 3/5] crypto: ccp - Use dma_set_mask_and_coherent to set DMA mask
Date: Tue, 3 Feb 2015 13:07:17 -0600	[thread overview]
Message-ID: <20150203190717.15045.89640.stgit@tlendack-t1.amdoffice.net> (raw)
In-Reply-To: <20150203190659.15045.21329.stgit@tlendack-t1.amdoffice.net>

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>
---
 drivers/crypto/ccp/ccp-platform.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/ccp/ccp-platform.c b/drivers/crypto/ccp/ccp-platform.c
index 9e09c50..04265a3 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)
 
 	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;

  parent reply	other threads:[~2015-02-03 19:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-03 19:06 [PATCH v1 0/5] crypto: ccp - CCP driver updates 2015-01-28 Tom Lendacky
2015-02-03 19:07 ` [PATCH v1 1/5] crypto: ccp - Updates for checkpatch warnings/errors Tom Lendacky
2015-02-03 19:07 ` [PATCH v1 2/5] crypto: ccp - Update CCP build support Tom Lendacky
2015-02-03 19:07 ` Tom Lendacky [this message]
2015-02-03 19:07 ` [PATCH v1 4/5] crypto: ccp - Convert calls to their devm_ counterparts Tom Lendacky
2015-02-03 19:07 ` [PATCH v1 5/5] crypto: ccp - Add ACPI support Tom Lendacky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150203190717.15045.89640.stgit@tlendack-t1.amdoffice.net \
    --to=thomas.lendacky@amd.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.