diff options
Diffstat (limited to 'arch/x86/include/asm/dma-mapping.h')
-rw-r--r-- | arch/x86/include/asm/dma-mapping.h | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h index 44461626830e..08a0838b83fb 100644 --- a/arch/x86/include/asm/dma-mapping.h +++ b/arch/x86/include/asm/dma-mapping.h | |||
@@ -25,18 +25,11 @@ extern int iommu_merge; | |||
25 | extern struct device x86_dma_fallback_dev; | 25 | extern struct device x86_dma_fallback_dev; |
26 | extern int panic_on_overflow; | 26 | extern int panic_on_overflow; |
27 | 27 | ||
28 | extern struct dma_map_ops *dma_ops; | 28 | extern const struct dma_map_ops *dma_ops; |
29 | 29 | ||
30 | static inline struct dma_map_ops *get_dma_ops(struct device *dev) | 30 | static inline const struct dma_map_ops *get_arch_dma_ops(struct bus_type *bus) |
31 | { | 31 | { |
32 | #ifndef CONFIG_X86_DEV_DMA_OPS | ||
33 | return dma_ops; | 32 | return dma_ops; |
34 | #else | ||
35 | if (unlikely(!dev) || !dev->archdata.dma_ops) | ||
36 | return dma_ops; | ||
37 | else | ||
38 | return dev->archdata.dma_ops; | ||
39 | #endif | ||
40 | } | 33 | } |
41 | 34 | ||
42 | bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp); | 35 | bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp); |