From 19dca8c0efa30e0a45e79f237060d0f307045752 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Sat, 23 Dec 2017 13:46:06 +0100 Subject: dma-direct: make dma_direct_{alloc,free} available to other implementations So that they don't need to indirect through the operation vector. Signed-off-by: Christoph Hellwig Reviewed-by: Vladimir Murzin --- lib/dma-direct.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/dma-direct.c b/lib/dma-direct.c index 4e43c2bb7f5f..784a68dfdbe3 100644 --- a/lib/dma-direct.c +++ b/lib/dma-direct.c @@ -40,8 +40,8 @@ static bool dma_coherent_ok(struct device *dev, phys_addr_t phys, size_t size) return phys_to_dma(dev, phys) + size - 1 <= dev->coherent_dma_mask; } -static void *dma_direct_alloc(struct device *dev, size_t size, - dma_addr_t *dma_handle, gfp_t gfp, unsigned long attrs) +void *dma_direct_alloc(struct device *dev, size_t size, dma_addr_t *dma_handle, + gfp_t gfp, unsigned long attrs) { unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; int page_order = get_order(size); @@ -84,7 +84,7 @@ again: return page_address(page); } -static void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, +void dma_direct_free(struct device *dev, size_t size, void *cpu_addr, dma_addr_t dma_addr, unsigned long attrs) { unsigned int count = PAGE_ALIGN(size) >> PAGE_SHIFT; -- cgit