]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/xen/swiotlb-xen.c
dma-mapping: consolidate dma_{alloc,free}_{attrs,coherent}
[karo-tx-linux.git] / drivers / xen / swiotlb-xen.c
index 4c549323c605d97591224050b00add55e3a833a0..da1029ef815924c74cbfe6cd7dc8d338840008c8 100644 (file)
@@ -311,9 +311,6 @@ xen_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
        */
        flags &= ~(__GFP_DMA | __GFP_HIGHMEM);
 
-       if (dma_alloc_from_coherent(hwdev, size, dma_handle, &ret))
-               return ret;
-
        /* On ARM this function returns an ioremap'ped virtual address for
         * which virt_to_phys doesn't return the corresponding physical
         * address. In fact on ARM virt_to_phys only works for kernel direct
@@ -356,9 +353,6 @@ xen_swiotlb_free_coherent(struct device *hwdev, size_t size, void *vaddr,
        phys_addr_t phys;
        u64 dma_mask = DMA_BIT_MASK(32);
 
-       if (dma_release_from_coherent(hwdev, order, vaddr))
-               return;
-
        if (hwdev && hwdev->coherent_dma_mask)
                dma_mask = hwdev->coherent_dma_mask;