diff options
author | Christoph Hellwig <hch@lst.de> | 2020-08-17 17:06:40 +0200 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2020-09-11 09:10:29 +0200 |
commit | 2f5388a29be82a62529d146499e70987e856f6f7 (patch) | |
tree | 244fc04e7926e48cf0faae79dbe3250ec3f00ef3 /arch/x86/kernel/amd_gart_64.c | |
parent | abdaf11ac18925ce8cc229e62e35b342d548ece2 (diff) | |
download | linux-stable-2f5388a29be82a62529d146499e70987e856f6f7.tar.gz linux-stable-2f5388a29be82a62529d146499e70987e856f6f7.tar.bz2 linux-stable-2f5388a29be82a62529d146499e70987e856f6f7.zip |
dma-direct: remove dma_direct_{alloc,free}_pages
Just merge these helpers into the main dma_direct_{alloc,free} routines,
as the additional checks are always false for the two callers.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Robin Murphy <robin.murphy@arm.com>
Diffstat (limited to 'arch/x86/kernel/amd_gart_64.c')
-rw-r--r-- | arch/x86/kernel/amd_gart_64.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/x86/kernel/amd_gart_64.c b/arch/x86/kernel/amd_gart_64.c index bccc5357bffd..153374b996a2 100644 --- a/arch/x86/kernel/amd_gart_64.c +++ b/arch/x86/kernel/amd_gart_64.c @@ -467,7 +467,7 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr, { void *vaddr; - vaddr = dma_direct_alloc_pages(dev, size, dma_addr, flag, attrs); + vaddr = dma_direct_alloc(dev, size, dma_addr, flag, attrs); if (!vaddr || !force_iommu || dev->coherent_dma_mask <= DMA_BIT_MASK(24)) return vaddr; @@ -479,7 +479,7 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr, goto out_free; return vaddr; out_free: - dma_direct_free_pages(dev, size, vaddr, *dma_addr, attrs); + dma_direct_free(dev, size, vaddr, *dma_addr, attrs); return NULL; } @@ -489,7 +489,7 @@ gart_free_coherent(struct device *dev, size_t size, void *vaddr, dma_addr_t dma_addr, unsigned long attrs) { gart_unmap_page(dev, dma_addr, size, DMA_BIDIRECTIONAL, 0); - dma_direct_free_pages(dev, size, vaddr, dma_addr, attrs); + dma_direct_free(dev, size, vaddr, dma_addr, attrs); } static int no_agp; |