|
@@ -31,8 +31,8 @@
|
|
|
/* Platform-bus mapping */
|
|
|
extern struct bus_type platform_bus_type;
|
|
|
#define is_lbus_device(dev) (dev && dev->bus == &platform_bus_type)
|
|
|
-#define __arch_dma_to_virt(dev, x) ({ is_lbus_device(dev) ? \
|
|
|
- __phys_to_virt(x) : __bus_to_virt(x); })
|
|
|
+#define __arch_dma_to_virt(dev, x) ({ (void *) (is_lbus_device(dev) ? \
|
|
|
+ __phys_to_virt(x) : __bus_to_virt(x)); })
|
|
|
#define __arch_virt_to_dma(dev, x) ({ is_lbus_device(dev) ? \
|
|
|
(dma_addr_t)__virt_to_phys(x) : (dma_addr_t)__virt_to_bus(x); })
|
|
|
#define __arch_page_to_dma(dev, x) __arch_virt_to_dma(dev, page_address(x))
|