diff options
Diffstat (limited to 'arch/mips/include/asm/dma-mapping.h')
-rw-r--r-- | arch/mips/include/asm/dma-mapping.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/arch/mips/include/asm/dma-mapping.h b/arch/mips/include/asm/dma-mapping.h index 006b43e38a9..7aa37ddfca4 100644 --- a/arch/mips/include/asm/dma-mapping.h +++ b/arch/mips/include/asm/dma-mapping.h | |||
@@ -40,8 +40,6 @@ static inline int dma_supported(struct device *dev, u64 mask) | |||
40 | static inline int dma_mapping_error(struct device *dev, u64 mask) | 40 | static inline int dma_mapping_error(struct device *dev, u64 mask) |
41 | { | 41 | { |
42 | struct dma_map_ops *ops = get_dma_ops(dev); | 42 | struct dma_map_ops *ops = get_dma_ops(dev); |
43 | |||
44 | debug_dma_mapping_error(dev, mask); | ||
45 | return ops->mapping_error(dev, mask); | 43 | return ops->mapping_error(dev, mask); |
46 | } | 44 | } |
47 | 45 | ||
@@ -59,31 +57,25 @@ dma_set_mask(struct device *dev, u64 mask) | |||
59 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, | 57 | extern void dma_cache_sync(struct device *dev, void *vaddr, size_t size, |
60 | enum dma_data_direction direction); | 58 | enum dma_data_direction direction); |
61 | 59 | ||
62 | #define dma_alloc_coherent(d,s,h,f) dma_alloc_attrs(d,s,h,f,NULL) | 60 | static inline void *dma_alloc_coherent(struct device *dev, size_t size, |
63 | 61 | dma_addr_t *dma_handle, gfp_t gfp) | |
64 | static inline void *dma_alloc_attrs(struct device *dev, size_t size, | ||
65 | dma_addr_t *dma_handle, gfp_t gfp, | ||
66 | struct dma_attrs *attrs) | ||
67 | { | 62 | { |
68 | void *ret; | 63 | void *ret; |
69 | struct dma_map_ops *ops = get_dma_ops(dev); | 64 | struct dma_map_ops *ops = get_dma_ops(dev); |
70 | 65 | ||
71 | ret = ops->alloc(dev, size, dma_handle, gfp, attrs); | 66 | ret = ops->alloc_coherent(dev, size, dma_handle, gfp); |
72 | 67 | ||
73 | debug_dma_alloc_coherent(dev, size, *dma_handle, ret); | 68 | debug_dma_alloc_coherent(dev, size, *dma_handle, ret); |
74 | 69 | ||
75 | return ret; | 70 | return ret; |
76 | } | 71 | } |
77 | 72 | ||
78 | #define dma_free_coherent(d,s,c,h) dma_free_attrs(d,s,c,h,NULL) | 73 | static inline void dma_free_coherent(struct device *dev, size_t size, |
79 | 74 | void *vaddr, dma_addr_t dma_handle) | |
80 | static inline void dma_free_attrs(struct device *dev, size_t size, | ||
81 | void *vaddr, dma_addr_t dma_handle, | ||
82 | struct dma_attrs *attrs) | ||
83 | { | 75 | { |
84 | struct dma_map_ops *ops = get_dma_ops(dev); | 76 | struct dma_map_ops *ops = get_dma_ops(dev); |
85 | 77 | ||
86 | ops->free(dev, size, vaddr, dma_handle, attrs); | 78 | ops->free_coherent(dev, size, vaddr, dma_handle); |
87 | 79 | ||
88 | debug_dma_free_coherent(dev, size, vaddr, dma_handle); | 80 | debug_dma_free_coherent(dev, size, vaddr, dma_handle); |
89 | } | 81 | } |