Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e2d07064 authored by Naveen Ramaraj's avatar Naveen Ramaraj Committed by Jeevan Shriram
Browse files

dma-mapping: Exclude remap functions when arch does not use DMA



The commit 'a106f65b("dma-mapping: Add dma_remap functions")' is
defined remap functions for ARM arch only, so it will break other
architecture compilation.

So remap functions are excluded, if arch is not using DMA.

Change-Id: Id39fcbac74f30a0ab1b3ce0c780460017ea189e5
Signed-off-by: default avatarNaveen Ramaraj <nramaraj@codeaurora.org>
Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: default avatarJeevan Shriram <jshriram@codeaurora.org>
parent e5cb9812
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -87,6 +87,8 @@ static inline int is_device_dma_capable(struct device *dev)
#else
#include <asm-generic/dma-mapping-broken.h>
#endif

#ifndef CONFIG_NO_DMA
static inline void *dma_remap(struct device *dev, void *cpu_addr,
		dma_addr_t dma_handle, size_t size, struct dma_attrs *attrs)
{
@@ -117,6 +119,7 @@ static inline void dma_unremap(struct device *dev, void *remapped_addr,

	return ops->unremap(dev, remapped_addr, size);
}
#endif


static inline u64 dma_get_mask(struct device *dev)