diff options
Diffstat (limited to 'arch/arm/include/asm/dma-mapping.h')
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index bf02dbd9ccda..716656925975 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h | |||
@@ -13,28 +13,22 @@ | |||
13 | #include <asm/xen/hypervisor.h> | 13 | #include <asm/xen/hypervisor.h> |
14 | 14 | ||
15 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) | 15 | #define DMA_ERROR_CODE (~(dma_addr_t)0x0) |
16 | extern struct dma_map_ops arm_dma_ops; | 16 | extern const struct dma_map_ops arm_dma_ops; |
17 | extern struct dma_map_ops arm_coherent_dma_ops; | 17 | extern const struct dma_map_ops arm_coherent_dma_ops; |
18 | 18 | ||
19 | static inline struct dma_map_ops *__generic_dma_ops(struct device *dev) | 19 | static inline const struct dma_map_ops *__generic_dma_ops(struct device *dev) |
20 | { | 20 | { |
21 | if (dev && dev->archdata.dma_ops) | 21 | if (dev && dev->dma_ops) |
22 | return dev->archdata.dma_ops; | 22 | return dev->dma_ops; |
23 | return &arm_dma_ops; | 23 | return &arm_dma_ops; |
24 | } | 24 | } |
25 | 25 | ||
26 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) | 26 | static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) |
27 | { | 27 | { |
28 | if (xen_initial_domain()) | 28 | if (xen_initial_domain()) |
29 | return xen_dma_ops; | 29 | return xen_dma_ops; |
30 | else | 30 | else |
31 | return __generic_dma_ops(dev); | 31 | return __generic_dma_ops(NULL); |
32 | } | ||
33 | |||
34 | static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops) | ||
35 | { | ||
36 | BUG_ON(!dev); | ||
37 | dev->archdata.dma_ops = ops; | ||
38 | } | 32 | } |
39 | 33 | ||
40 | #define HAVE_ARCH_DMA_SUPPORTED 1 | 34 | #define HAVE_ARCH_DMA_SUPPORTED 1 |