diff options
Diffstat (limited to 'arch/sparc/include/asm/dma-mapping.h')
-rw-r--r-- | arch/sparc/include/asm/dma-mapping.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index 2677818dc78..5a8c308e2b5 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h | |||
@@ -32,8 +32,11 @@ static inline void *dma_alloc_coherent(struct device *dev, size_t size, | |||
32 | dma_addr_t *dma_handle, gfp_t flag) | 32 | dma_addr_t *dma_handle, gfp_t flag) |
33 | { | 33 | { |
34 | struct dma_map_ops *ops = get_dma_ops(dev); | 34 | struct dma_map_ops *ops = get_dma_ops(dev); |
35 | void *cpu_addr; | ||
35 | 36 | ||
36 | return ops->alloc_coherent(dev, size, dma_handle, flag); | 37 | cpu_addr = ops->alloc_coherent(dev, size, dma_handle, flag); |
38 | debug_dma_alloc_coherent(dev, size, *dma_handle, cpu_addr); | ||
39 | return cpu_addr; | ||
37 | } | 40 | } |
38 | 41 | ||
39 | static inline void dma_free_coherent(struct device *dev, size_t size, | 42 | static inline void dma_free_coherent(struct device *dev, size_t size, |
@@ -41,6 +44,7 @@ static inline void dma_free_coherent(struct device *dev, size_t size, | |||
41 | { | 44 | { |
42 | struct dma_map_ops *ops = get_dma_ops(dev); | 45 | struct dma_map_ops *ops = get_dma_ops(dev); |
43 | 46 | ||
47 | debug_dma_free_coherent(dev, size, cpu_addr, dma_handle); | ||
44 | ops->free_coherent(dev, size, cpu_addr, dma_handle); | 48 | ops->free_coherent(dev, size, cpu_addr, dma_handle); |
45 | } | 49 | } |
46 | 50 | ||