From 22955502470349cf001b7a8580f7781e59ecd58a Mon Sep 17 00:00:00 2001 From: Sathish Ambley Date: Mon, 7 Nov 2016 10:11:51 -0800 Subject: [PATCH] msm: ADSPRPC: Use secure session device while freeing memory Make sure that the secure session device is used while freeing the buffer that was allocated from secure memory. Change-Id: I07802c21c661fe18fb2fda70980b04f646408d7d Signed-off-by: Sathish Ambley --- drivers/char/adsprpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/char/adsprpc.c b/drivers/char/adsprpc.c index ef8aaac6e0a2..7767086df849 100644 --- a/drivers/char/adsprpc.c +++ b/drivers/char/adsprpc.c @@ -490,7 +490,7 @@ static void fastrpc_mmap_free(struct fastrpc_mmap *map) ion_free(fl->apps->client, map->handle); if (sess->smmu.enabled) { if (map->size || map->phys) - msm_dma_unmap_sg(fl->sctx->dev, + msm_dma_unmap_sg(sess->dev, map->table->sgl, map->table->nents, DMA_BIDIRECTIONAL, map->buf);