Commit e259f191 authored by Heiko Carstens's avatar Heiko Carstens Committed by Linus Torvalds

dma-mapping: fix build errors on !HAS_DMA architectures

commit 4565f017 "dma-mapping: unify
dma_get_cache_alignment implementations" causes build errors on
!HAS_DMA architectures/platforms like s390 and sun3:

include/linux/dma-mapping.h:145: error: static declaration of 'dma_get_cache_alignment' follows non-static declaration
include/asm-generic/dma-mapping-broken.h:73: error: previous declaration of 'dma_get_cache_alignment' was here

Fix this by adding an explicit ifdef.

Cc: Geert Uytterhoeven <>
Acked-by: default avatarFUJITA Tomonori <>
Signed-off-by: default avatarHeiko Carstens <>
Signed-off-by: default avatarLinus Torvalds <>
parent c7dcf87a
......@@ -142,6 +142,7 @@ static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask)
return -EIO;
static inline int dma_get_cache_alignment(void)
......@@ -149,6 +150,7 @@ static inline int dma_get_cache_alignment(void)
return 1;
/* flags for the coherent memory api */
#define DMA_MEMORY_MAP 0x01
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment