diff options
author | Adrian Bunk <bunk@kernel.org> | 2007-10-24 03:35:26 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2007-10-30 00:09:01 -0400 |
commit | 6dc8087ca5116f25cdc36a16fdfb18a10824952e (patch) | |
tree | e93c8acc73279077450d22a099def0e03da083d0 /include | |
parent | cbd627a44928ba20b5c22b21b8ce2be27733a9d7 (diff) |
sh64: fix dma_cache_sync() compilation
This patch fixes the following compile error caused by
commit 622a9edd919de98ef59571ae6c40c7458244e3f2:
<-- snip -->
...
CC init/main.o
In file included from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/dma-mapping.h:52,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/dmaengine.h:29,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/skbuff.h:29,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/netlink.h:155,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/genetlink.h:4,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/net/genetlink.h:4,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/include/linux/taskstats_kern.h:12,
from /home/bunk/linux/kernel-2.6/git/linux-2.6/init/main.c:46:
include2/asm/dma-mapping.h: In function 'dma_cache_sync':
include2/asm/dma-mapping.h:46: error: invalid operands to binary & (have 'void *' and 'int')
make[2]: *** [init/main.o] Error 1
<-- snip -->
Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-sh64/dma-mapping.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/asm-sh64/dma-mapping.h b/include/asm-sh64/dma-mapping.h index 1438b763a5ea..18f8dd642ac5 100644 --- a/include/asm-sh64/dma-mapping.h +++ b/include/asm-sh64/dma-mapping.h | |||
@@ -42,8 +42,9 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 42 | static inline void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
43 | enum dma_data_direction dir) | 43 | enum dma_data_direction dir) |
44 | { | 44 | { |
45 | unsigned long s = (unsigned long) vaddr & L1_CACHE_ALIGN_MASK; | 45 | unsigned long start = (unsigned long) vaddr; |
46 | unsigned long e = (vaddr + size) & L1_CACHE_ALIGN_MASK; | 46 | unsigned long s = start & L1_CACHE_ALIGN_MASK; |
47 | unsigned long e = (start + size) & L1_CACHE_ALIGN_MASK; | ||
47 | 48 | ||
48 | for (; s <= e; s += L1_CACHE_BYTES) | 49 | for (; s <= e; s += L1_CACHE_BYTES) |
49 | asm volatile ("ocbp %0, 0" : : "r" (s)); | 50 | asm volatile ("ocbp %0, 0" : : "r" (s)); |