summaryrefslogtreecommitdiff
path: root/arch/blackfin/include/asm/dma-mapping.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/blackfin/include/asm/dma-mapping.h')
-rw-r--r--arch/blackfin/include/asm/dma-mapping.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/blackfin/include/asm/dma-mapping.h b/arch/blackfin/include/asm/dma-mapping.h
index 413a30314a6f..212cb80fd74b 100644
--- a/arch/blackfin/include/asm/dma-mapping.h
+++ b/arch/blackfin/include/asm/dma-mapping.h
@@ -44,13 +44,8 @@ dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
extern void
__dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir);
static inline void
-_dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir)
+__dma_sync_inline(dma_addr_t addr, size_t size, enum dma_data_direction dir)
{
- if (!__builtin_constant_p(dir)) {
- __dma_sync(addr, size, dir);
- return;
- }
-
switch (dir) {
case DMA_NONE:
BUG();
@@ -64,6 +59,14 @@ _dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir)
break;
}
}
+static inline void
+_dma_sync(dma_addr_t addr, size_t size, enum dma_data_direction dir)
+{
+ if (__builtin_constant_p(dir))
+ __dma_sync_inline(addr, size, dir);
+ else
+ __dma_sync(addr, size, dir);
+}
static inline dma_addr_t
dma_map_single(struct device *dev, void *ptr, size_t size,