summaryrefslogtreecommitdiff
path: root/drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c')
-rw-r--r--drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c b/drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c
index 4a8f9def0c8b..d98b681f6c06 100644
--- a/drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c
+++ b/drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c
@@ -24,6 +24,7 @@ static void rk_crypto_complete(struct rk_crypto_info *dev, int err)
static int rk_handle_req(struct rk_crypto_info *dev,
struct ablkcipher_request *req)
{
+ unsigned long flags;
int err;
if (!IS_ALIGNED(req->nbytes, dev->align_size))
@@ -38,9 +39,9 @@ static int rk_handle_req(struct rk_crypto_info *dev,
dev->aligned = 1;
dev->ablk_req = req;
- spin_lock(&dev->lock);
+ spin_lock_irqsave(&dev->lock, flags);
err = ablkcipher_enqueue_request(&dev->queue, req);
- spin_unlock(&dev->lock);
+ spin_unlock_irqrestore(&dev->lock, flags);
tasklet_schedule(&dev->crypto_tasklet);
return err;
}
@@ -267,12 +268,13 @@ static int rk_set_data_start(struct rk_crypto_info *dev)
static int rk_ablk_start(struct rk_crypto_info *dev)
{
+ unsigned long flags;
int err;
- spin_lock(&dev->lock);
+ spin_lock_irqsave(&dev->lock, flags);
rk_ablk_hw_init(dev);
err = rk_set_data_start(dev);
- spin_unlock(&dev->lock);
+ spin_unlock_irqrestore(&dev->lock, flags);
return err;
}