crypto: ux500 - Fix the parameter of dma_unmap_sg()
[linux-2.6-microblaze.git] / drivers / crypto / ux500 / hash / hash_core.c
index da284b0..67b1237 100644 (file)
@@ -190,7 +190,7 @@ static void hash_dma_done(struct hash_ctx *ctx)
        chan = ctx->device->dma.chan_mem2hash;
        dmaengine_terminate_all(chan);
        dma_unmap_sg(chan->device->dev, ctx->device->dma.sg,
-                    ctx->device->dma.sg_len, DMA_TO_DEVICE);
+                    ctx->device->dma.nents, DMA_TO_DEVICE);
 }
 
 static int hash_dma_write(struct hash_ctx *ctx,