summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/sahara.c
diff options
context:
space:
mode:
authorFabio Estevam2016-02-03 13:46:50 +0100
committerHerbert Xu2016-02-06 08:33:28 +0100
commit6e56201857fabf0249204704e2a15e6f61d5a05c (patch)
tree5884d96f5029b8e93c7aa113f72b30d907b82675 /drivers/crypto/sahara.c
parentcrypto: testmgr - Add a test case for import()/export() (diff)
downloadkernel-qcow2-linux-6e56201857fabf0249204704e2a15e6f61d5a05c.tar.gz
kernel-qcow2-linux-6e56201857fabf0249204704e2a15e6f61d5a05c.tar.xz
kernel-qcow2-linux-6e56201857fabf0249204704e2a15e6f61d5a05c.zip
crypto: sahara - remove unneeded mutex in the exported state
As pointed out by Herbert Xu we should not include the mutex in the exported state, so let's just get rid of it. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/sahara.c')
-rw-r--r--drivers/crypto/sahara.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/crypto/sahara.c b/drivers/crypto/sahara.c
index 6c4f91c5e6b3..7e8147df6e0d 100644
--- a/drivers/crypto/sahara.c
+++ b/drivers/crypto/sahara.c
@@ -182,7 +182,6 @@ struct sahara_sha_reqctx {
u8 buf[SAHARA_MAX_SHA_BLOCK_SIZE];
u8 rembuf[SAHARA_MAX_SHA_BLOCK_SIZE];
u8 context[SHA256_DIGEST_SIZE + 4];
- struct mutex mutex;
unsigned int mode;
unsigned int digest_size;
unsigned int context_size;
@@ -1096,7 +1095,6 @@ static int sahara_sha_enqueue(struct ahash_request *req, int last)
if (!req->nbytes && !last)
return 0;
- mutex_lock(&rctx->mutex);
rctx->last = last;
if (!rctx->active) {
@@ -1109,7 +1107,6 @@ static int sahara_sha_enqueue(struct ahash_request *req, int last)
mutex_unlock(&dev->queue_mutex);
wake_up_process(dev->kthread);
- mutex_unlock(&rctx->mutex);
return ret;
}
@@ -1137,8 +1134,6 @@ static int sahara_sha_init(struct ahash_request *req)
rctx->context_size = rctx->digest_size + 4;
rctx->active = 0;
- mutex_init(&rctx->mutex);
-
return 0;
}