summaryrefslogtreecommitdiffstats
path: root/drivers/crypto/mediatek/mtk-sha.c
diff options
context:
space:
mode:
authorRyder Lee <ryder.lee@mediatek.com>2017-03-09 03:11:13 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2017-03-16 10:58:52 +0100
commitb7a2be388b5574428170e1a22f800f1d71cbfd64 (patch)
tree83cbe0c04b4c30e4a78a68d262bacf049272514d /drivers/crypto/mediatek/mtk-sha.c
parentcrypto: mediatek - rework interrupt handler (diff)
downloadlinux-b7a2be388b5574428170e1a22f800f1d71cbfd64.tar.xz
linux-b7a2be388b5574428170e1a22f800f1d71cbfd64.zip
crypto: mediatek - add MTK_* prefix and correct annotations.
Dummy patch to add MTK_* prefix to ring enum and fix incorrect annotations. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/mediatek/mtk-sha.c')
-rw-r--r--drivers/crypto/mediatek/mtk-sha.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/crypto/mediatek/mtk-sha.c b/drivers/crypto/mediatek/mtk-sha.c
index 1fb98f6a4ca3..b4f0c62a9152 100644
--- a/drivers/crypto/mediatek/mtk-sha.c
+++ b/drivers/crypto/mediatek/mtk-sha.c
@@ -694,7 +694,7 @@ static void mtk_sha_finish_req(struct mtk_cryp *cryp,
sha->req->base.complete(&sha->req->base, err);
/* Handle new request */
- mtk_sha_handle_queue(cryp, sha->id - RING2, NULL);
+ mtk_sha_handle_queue(cryp, sha->id - MTK_RING2, NULL);
}
static int mtk_sha_handle_queue(struct mtk_cryp *cryp, u8 id,
@@ -1269,8 +1269,8 @@ static int mtk_sha_record_init(struct mtk_cryp *cryp)
}
/* Link to ring2 and ring3 respectively */
- sha[0]->id = RING2;
- sha[1]->id = RING3;
+ sha[0]->id = MTK_RING2;
+ sha[1]->id = MTK_RING3;
cryp->rec = 1;
@@ -1343,14 +1343,14 @@ int mtk_hash_alg_register(struct mtk_cryp *cryp)
if (err)
goto err_record;
- err = devm_request_irq(cryp->dev, cryp->irq[RING2], mtk_sha_irq,
+ err = devm_request_irq(cryp->dev, cryp->irq[MTK_RING2], mtk_sha_irq,
0, "mtk-sha", cryp->sha[0]);
if (err) {
dev_err(cryp->dev, "unable to request sha irq0.\n");
goto err_res;
}
- err = devm_request_irq(cryp->dev, cryp->irq[RING3], mtk_sha_irq,
+ err = devm_request_irq(cryp->dev, cryp->irq[MTK_RING3], mtk_sha_irq,
0, "mtk-sha", cryp->sha[1]);
if (err) {
dev_err(cryp->dev, "unable to request sha irq1.\n");
@@ -1358,8 +1358,8 @@ int mtk_hash_alg_register(struct mtk_cryp *cryp)
}
/* Enable ring2 and ring3 interrupt for hash */
- mtk_sha_write(cryp, AIC_ENABLE_SET(RING2), MTK_IRQ_RDR2);
- mtk_sha_write(cryp, AIC_ENABLE_SET(RING3), MTK_IRQ_RDR3);
+ mtk_sha_write(cryp, AIC_ENABLE_SET(MTK_RING2), MTK_IRQ_RDR2);
+ mtk_sha_write(cryp, AIC_ENABLE_SET(MTK_RING3), MTK_IRQ_RDR3);
cryp->tmp = dma_alloc_coherent(cryp->dev, SHA_TMP_BUF_SIZE,
&cryp->tmp_dma, GFP_KERNEL);