aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/crypto
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2016-09-19 11:22:14 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2016-09-22 06:32:50 -0400
commit8addf571aeb7ef096201315737543b4c5303300a (patch)
tree920c98015b78fd2c30d9d9cc7bb51e84eea483d5 /drivers/crypto
parent744e686a446cb4667ad42c530d372fbbc963507b (diff)
crypto: omap-sham - rename sgl to sgl_tmp for deprecation
The current usage of sgl will be deprecated, and will be replaced by an array required by the sg based driver implementation. Rename the existing variable as sgl_tmp so that it can be removed from the driver easily later. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto')
-rw-r--r--drivers/crypto/omap-sham.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index 3f2bf98db54b..33bea520f50a 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -151,7 +151,7 @@ struct omap_sham_reqctx {
151 151
152 /* walk state */ 152 /* walk state */
153 struct scatterlist *sg; 153 struct scatterlist *sg;
154 struct scatterlist sgl; 154 struct scatterlist sgl_tmp;
155 unsigned int offset; /* offset in current sg */ 155 unsigned int offset; /* offset in current sg */
156 unsigned int total; /* total request */ 156 unsigned int total; /* total request */
157 157
@@ -583,18 +583,19 @@ static int omap_sham_xmit_dma(struct omap_sham_dev *dd, dma_addr_t dma_addr,
583 if (is_sg) { 583 if (is_sg) {
584 /* 584 /*
585 * The SG entry passed in may not have the 'length' member 585 * The SG entry passed in may not have the 'length' member
586 * set correctly so use a local SG entry (sgl) with the 586 * set correctly so use a local SG entry (sgl_tmp) with the
587 * proper value for 'length' instead. If this is not done, 587 * proper value for 'length' instead. If this is not done,
588 * the dmaengine may try to DMA the incorrect amount of data. 588 * the dmaengine may try to DMA the incorrect amount of data.
589 */ 589 */
590 sg_init_table(&ctx->sgl, 1); 590 sg_init_table(&ctx->sgl_tmp, 1);
591 sg_assign_page(&ctx->sgl, sg_page(ctx->sg)); 591 sg_assign_page(&ctx->sgl_tmp, sg_page(ctx->sg));
592 ctx->sgl.offset = ctx->sg->offset; 592 ctx->sgl_tmp.offset = ctx->sg->offset;
593 sg_dma_len(&ctx->sgl) = len32; 593 sg_dma_len(&ctx->sgl_tmp) = len32;
594 sg_dma_address(&ctx->sgl) = sg_dma_address(ctx->sg); 594 sg_dma_address(&ctx->sgl_tmp) = sg_dma_address(ctx->sg);
595 595
596 tx = dmaengine_prep_slave_sg(dd->dma_lch, &ctx->sgl, 1, 596 tx = dmaengine_prep_slave_sg(dd->dma_lch, &ctx->sgl_tmp, 1,
597 DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 597 DMA_MEM_TO_DEV,
598 DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
598 } else { 599 } else {
599 tx = dmaengine_prep_slave_single(dd->dma_lch, dma_addr, len32, 600 tx = dmaengine_prep_slave_single(dd->dma_lch, dma_addr, len32,
600 DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK); 601 DMA_MEM_TO_DEV, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);