mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]> Reviewed-by: Vladimir Murzin <[email protected]>
This commit is contained in:
parent
95f183916d
commit
19dca8c0ef
3 changed files with 11 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue