diff --git a/drivers/staging/android/ion/msm/msm_ion.c b/drivers/staging/android/ion/msm/msm_ion.c index cd3f78c6ec28..4322ce5110c6 100644 --- a/drivers/staging/android/ion/msm/msm_ion.c +++ b/drivers/staging/android/ion/msm/msm_ion.c @@ -785,6 +785,8 @@ int msm_ion_heap_buffer_zero(struct ion_buffer *buffer) for_each_sg(table->sgl, sg, table->nents, i) { struct page *page = sg_page(sg); unsigned long len = sg->length; + /* needed to make dma_sync_sg_for_device work: */ + sg->dma_address = sg_phys(sg); for (j = 0; j < len / PAGE_SIZE; j++) pages_mem.pages[npages++] = page + j;