[PATCH 4/4] dma: don't allow override of dma_alloc/dma_free

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


There are no architectures left defining their own dma_alloc/dma_free.
Instead, they define DMA_ALIGNMENT and use <dma.h>'s common

This will be useful later on, as we can use DMA_ALIGNMENT for sanity
checking with CONFIG_DMA_DEBUG_API. Till then, ensure we get no new
architecture-specific definitions of dma_alloc/dma_free, by preventing
override of the <dma.h> implementation.

Signed-off-by: Ahmad Fatoum <a.fatoum@xxxxxxxxxxxxxx>
 include/dma.h | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/include/dma.h b/include/dma.h
index 266a7f323fa5..df9807b4f2e4 100644
--- a/include/dma.h
+++ b/include/dma.h
@@ -21,19 +21,15 @@
 #define DMA_ALIGNMENT	32
-#ifndef dma_alloc
 static inline void *dma_alloc(size_t size)
 	return xmemalign(DMA_ALIGNMENT, ALIGN(size, DMA_ALIGNMENT));
-#ifndef dma_free
 static inline void dma_free(void *mem)
 #define DMA_BIT_MASK(n)	(((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))

[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux