aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRussell King <rmk@flint.arm.linux.org.uk>2004-08-17 13:36:34 +0100
committerRussell King <rmk@flint.arm.linux.org.uk>2004-08-17 13:36:34 +0100
commit2ac066ce93e6df26455f3af5c7a214aeb52c83ef (patch)
tree06783d6d69ad48060c8604be84010c65690fe294 /include
parentc26ba334a93fa610516f251697452604c1556edb (diff)
downloadhistory-2ac066ce93e6df26455f3af5c7a214aeb52c83ef.tar.gz
[ARM] Deprecate virt_to_bus/bus_to_virt.
These macros don't take account of which bus is actually required, so they should not be used in new drivers; in fact, new drivers should use the DMA API.
Diffstat (limited to 'include')
-rw-r--r--include/asm-arm/memory.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/include/asm-arm/memory.h b/include/asm-arm/memory.h
index 41f117fb5e9f85..4902e9dbad5ebf 100644
--- a/include/asm-arm/memory.h
+++ b/include/asm-arm/memory.h
@@ -108,10 +108,18 @@ static inline void *phys_to_virt(unsigned long x)
/*
* Virtual <-> DMA view memory address translations
* Again, these are *only* valid on the kernel direct mapped RAM
- * memory. Use of these is *deprecated*.
+ * memory. Use of these is *deprecated* (and that doesn't mean
+ * use the __ prefixed forms instead.) See dma-mapping.h.
*/
-#define virt_to_bus(x) (__virt_to_bus((unsigned long)(x)))
-#define bus_to_virt(x) ((void *)(__bus_to_virt((unsigned long)(x))))
+static inline __deprecated unsigned long virt_to_bus(void *x)
+{
+ return __virt_to_bus((unsigned long)x);
+}
+
+static inline __deprecated void *bus_to_virt(unsigned long x)
+{
+ return (void *)__bus_to_virt(x);
+}
/*
* Conversion between a struct page and a physical address.