aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/dma-mapping.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/include/asm/dma-mapping.h')
-rw-r--r--arch/x86/include/asm/dma-mapping.h11
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;
25extern struct device x86_dma_fallback_dev; 25extern struct device x86_dma_fallback_dev;
26extern int panic_on_overflow; 26extern int panic_on_overflow;
27 27
28extern struct dma_map_ops *dma_ops; 28extern const struct dma_map_ops *dma_ops;
29 29
30static inline struct dma_map_ops *get_dma_ops(struct device *dev) 30static 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
42bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp); 35bool arch_dma_alloc_attrs(struct device **dev, gfp_t *gfp);