diff options
Diffstat (limited to 'drivers/base/dma-coherent.c')
-rw-r--r-- | drivers/base/dma-coherent.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/base/dma-coherent.c b/drivers/base/dma-coherent.c index 25bb398ec7a1..bdf28f7dd5e8 100644 --- a/drivers/base/dma-coherent.c +++ b/drivers/base/dma-coherent.c @@ -187,7 +187,10 @@ int dma_alloc_from_coherent(struct device *dev, ssize_t size, */ *dma_handle = mem->device_base + (pageno << PAGE_SHIFT); *ret = mem->virt_base + (pageno << PAGE_SHIFT); - memset(*ret, 0, size); + if (mem->flags & DMA_MEMORY_MAP) + memset(*ret, 0, size); + else + memset_io(*ret, 0, size); spin_unlock_irqrestore(&mem->spinlock, flags); return 1; |