summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHareesh Gundu <hareeshg@codeaurora.org>2017-08-07 15:00:32 +0530
committerHareesh Gundu <hareeshg@codeaurora.org>2017-08-08 12:57:53 +0530
commit3171bf3ddf8d5223638e4dfcf1822b8f45e632f5 (patch)
tree9f637ca4fd1fbf20fbb2c232bfa2c244f1d7db0c
parentd843c02a78884df35eaa579aa30b7e831cdca51d (diff)
ion: Correct argument of Set/ClearPagePrivate of secure CMA
On each sg of secure CMA buffer to set/clear page private bit, we should use the sg_page(sg) rather than sg_page(sgt->sgl). Change-Id: I05300d9d3a0931d2a0c113f945b45136e0dea01e Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
-rw-r--r--drivers/staging/android/ion/ion_cma_heap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/android/ion/ion_cma_heap.c b/drivers/staging/android/ion/ion_cma_heap.c
index 62d2667ee2f6..d932db4f9810 100644
--- a/drivers/staging/android/ion/ion_cma_heap.c
+++ b/drivers/staging/android/ion/ion_cma_heap.c
@@ -262,7 +262,7 @@ static void ion_secure_cma_free(struct ion_buffer *buffer)
}
for_each_sg(sgt->sgl, sg, sgt->nents, i)
- ClearPagePrivate(sg_page(sgt->sgl));
+ ClearPagePrivate(sg_page(sg));
ion_cma_free(buffer);
}
@@ -308,7 +308,7 @@ static int ion_secure_cma_allocate(struct ion_heap *heap,
/* Set the private bit to indicate that we've secured this */
for_each_sg(sgt->sgl, sg, sgt->nents, i)
- SetPagePrivate(sg_page(sgt->sgl));
+ SetPagePrivate(sg_page(sg));
return ret;