diff options
Diffstat (limited to 'drivers/crypto/rockchip')
-rw-r--r-- | drivers/crypto/rockchip/rk3288_crypto.c | 5 | ||||
-rw-r--r-- | drivers/crypto/rockchip/rk3288_crypto_ablkcipher.c | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/drivers/crypto/rockchip/rk3288_crypto.c b/drivers/crypto/rockchip/rk3288_crypto.c index 6b72f8d2e643..da9c73dce4af 100644 --- a/drivers/crypto/rockchip/rk3288_crypto.c +++ b/drivers/crypto/rockchip/rk3288_crypto.c @@ -190,12 +190,13 @@ static void rk_crypto_tasklet_cb(unsigned long data) { struct rk_crypto_info *dev = (struct rk_crypto_info *)data; struct crypto_async_request *async_req, *backlog; + unsigned long flags; int err = 0; - spin_lock(&dev->lock); + spin_lock_irqsave(&dev->lock, flags); backlog = crypto_get_backlog(&dev->queue); async_req = crypto_dequeue_request(&dev->queue); - spin_unlock(&dev->lock); + spin_unlock_irqrestore(&dev->lock, flags); if (!async_req) { dev_err(dev->dev, "async_req is NULL !!\n"); return; 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; } |