summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-12-23 13:46:06 +0100
committerChristoph Hellwig <hch@lst.de>2018-01-15 09:35:14 +0100
commit19dca8c0efa30e0a45e79f237060d0f307045752 (patch)
tree7af0e38c3abd148c110d88900630f837e7e79617 /lib
parent95f183916d4b0bc1943684948ecdd2469f1aa978 (diff)
downloadlinux-19dca8c0efa30e0a45e79f237060d0f307045752.tar.bz2
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 <hch@lst.de> Reviewed-by: Vladimir Murzin <vladimir.murzin@arm.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/dma-direct.c6
1 files changed, 3 insertions, 3 deletions
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;