diff options
Diffstat (limited to 'arch/mips/mm/dma-default.c')
-rw-r--r-- | arch/mips/mm/dma-default.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/arch/mips/mm/dma-default.c b/arch/mips/mm/dma-default.c index 8f23cf08f4ba..6c0fd13fa8e8 100644 --- a/arch/mips/mm/dma-default.c +++ b/arch/mips/mm/dma-default.c | |||
@@ -137,9 +137,6 @@ static void *mips_dma_alloc_coherent(struct device *dev, size_t size, | |||
137 | struct page *page = NULL; | 137 | struct page *page = NULL; |
138 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; | 138 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; |
139 | 139 | ||
140 | if (dma_alloc_from_coherent(dev, size, dma_handle, &ret)) | ||
141 | return ret; | ||
142 | |||
143 | gfp = massage_gfp_flags(dev, gfp); | 140 | gfp = massage_gfp_flags(dev, gfp); |
144 | 141 | ||
145 | if (IS_ENABLED(CONFIG_DMA_CMA) && !(gfp & GFP_ATOMIC)) | 142 | if (IS_ENABLED(CONFIG_DMA_CMA) && !(gfp & GFP_ATOMIC)) |
@@ -176,13 +173,9 @@ static void mips_dma_free_coherent(struct device *dev, size_t size, void *vaddr, | |||
176 | dma_addr_t dma_handle, struct dma_attrs *attrs) | 173 | dma_addr_t dma_handle, struct dma_attrs *attrs) |
177 | { | 174 | { |
178 | unsigned long addr = (unsigned long) vaddr; | 175 | unsigned long addr = (unsigned long) vaddr; |
179 | int order = get_order(size); | ||
180 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; | 176 | unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; |
181 | struct page *page = NULL; | 177 | struct page *page = NULL; |
182 | 178 | ||
183 | if (dma_release_from_coherent(dev, order, vaddr)) | ||
184 | return; | ||
185 | |||
186 | plat_unmap_dma_mem(dev, dma_handle, size, DMA_BIDIRECTIONAL); | 179 | plat_unmap_dma_mem(dev, dma_handle, size, DMA_BIDIRECTIONAL); |
187 | 180 | ||
188 | if (!plat_device_is_coherent(dev) && !hw_coherentio) | 181 | if (!plat_device_is_coherent(dev) && !hw_coherentio) |