aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2010-08-13 03:39:18 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-13 15:03:24 -0400
commite259f191f2244df04a7746fac1df8aa68ebd0106 (patch)
treee466b1d9018e23a5e06216368a4885059eb89849 /include/linux
parentc7dcf87a6881bf796faee83003163eb3de41a309 (diff)
dma-mapping: fix build errors on !HAS_DMA architectures
commit 4565f0170dfc849b3629c27d769db800467baa62 "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 <geert@linux-m68k.org> Acked-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/dma-mapping.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index e0670a512056..ce29b8151198 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -142,6 +142,7 @@ static inline int dma_set_seg_boundary(struct device *dev, unsigned long mask)
142 return -EIO; 142 return -EIO;
143} 143}
144 144
145#ifdef CONFIG_HAS_DMA
145static inline int dma_get_cache_alignment(void) 146static inline int dma_get_cache_alignment(void)
146{ 147{
147#ifdef ARCH_DMA_MINALIGN 148#ifdef ARCH_DMA_MINALIGN
@@ -149,6 +150,7 @@ static inline int dma_get_cache_alignment(void)
149#endif 150#endif
150 return 1; 151 return 1;
151} 152}
153#endif
152 154
153/* flags for the coherent memory api */ 155/* flags for the coherent memory api */
154#define DMA_MEMORY_MAP 0x01 156#define DMA_MEMORY_MAP 0x01