diff options
author | Glauber Costa <gcosta@redhat.com> | 2008-03-25 17:36:22 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-19 13:19:56 -0400 |
commit | 0cb0ae68323657663e4e8c0c1ce82a5af6621bbb (patch) | |
tree | 543d3f18b5239d73b12e36af750c62c6e8b2733d /include | |
parent | 22456b97148be300e25e9cb97244656775972475 (diff) |
x86: move dma_unmap_single to common header
i386 base does not need it, so it gets an empty function.
Signed-off-by: Glauber Costa <gcosta@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-x86/dma-mapping.h | 10 | ||||
-rw-r--r-- | include/asm-x86/dma-mapping_32.h | 7 | ||||
-rw-r--r-- | include/asm-x86/dma-mapping_64.h | 8 |
3 files changed, 10 insertions, 15 deletions
diff --git a/include/asm-x86/dma-mapping.h b/include/asm-x86/dma-mapping.h index d320244db8af..bb0378f2b933 100644 --- a/include/asm-x86/dma-mapping.h +++ b/include/asm-x86/dma-mapping.h | |||
@@ -66,4 +66,14 @@ dma_map_single(struct device *hwdev, void *ptr, size_t size, | |||
66 | return dma_ops->map_single(hwdev, ptr, size, direction); | 66 | return dma_ops->map_single(hwdev, ptr, size, direction); |
67 | } | 67 | } |
68 | 68 | ||
69 | static inline void | ||
70 | dma_unmap_single(struct device *dev, dma_addr_t addr, size_t size, | ||
71 | int direction) | ||
72 | { | ||
73 | BUG_ON(!valid_dma_direction(direction)); | ||
74 | if (dma_ops->unmap_single) | ||
75 | dma_ops->unmap_single(dev, addr, size, direction); | ||
76 | } | ||
77 | |||
78 | |||
69 | #endif | 79 | #endif |
diff --git a/include/asm-x86/dma-mapping_32.h b/include/asm-x86/dma-mapping_32.h index b496306d5e98..0b27cb0dbb75 100644 --- a/include/asm-x86/dma-mapping_32.h +++ b/include/asm-x86/dma-mapping_32.h | |||
@@ -17,13 +17,6 @@ void *dma_alloc_coherent(struct device *dev, size_t size, | |||
17 | void dma_free_coherent(struct device *dev, size_t size, | 17 | void dma_free_coherent(struct device *dev, size_t size, |
18 | void *vaddr, dma_addr_t dma_handle); | 18 | void *vaddr, dma_addr_t dma_handle); |
19 | 19 | ||
20 | static inline void | ||
21 | dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, | ||
22 | enum dma_data_direction direction) | ||
23 | { | ||
24 | BUG_ON(!valid_dma_direction(direction)); | ||
25 | } | ||
26 | |||
27 | static inline int | 20 | static inline int |
28 | dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, | 21 | dma_map_sg(struct device *dev, struct scatterlist *sglist, int nents, |
29 | enum dma_data_direction direction) | 22 | enum dma_data_direction direction) |
diff --git a/include/asm-x86/dma-mapping_64.h b/include/asm-x86/dma-mapping_64.h index 969a7da0cf97..5d349db23c99 100644 --- a/include/asm-x86/dma-mapping_64.h +++ b/include/asm-x86/dma-mapping_64.h | |||
@@ -23,14 +23,6 @@ extern void *dma_alloc_coherent(struct device *dev, size_t size, | |||
23 | extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr, | 23 | extern void dma_free_coherent(struct device *dev, size_t size, void *vaddr, |
24 | dma_addr_t dma_handle); | 24 | dma_addr_t dma_handle); |
25 | 25 | ||
26 | static inline void | ||
27 | dma_unmap_single(struct device *dev, dma_addr_t addr,size_t size, | ||
28 | int direction) | ||
29 | { | ||
30 | BUG_ON(!valid_dma_direction(direction)); | ||
31 | dma_ops->unmap_single(dev, addr, size, direction); | ||
32 | } | ||
33 | |||
34 | #define dma_map_page(dev,page,offset,size,dir) \ | 26 | #define dma_map_page(dev,page,offset,size,dir) \ |
35 | dma_map_single((dev), page_address(page)+(offset), (size), (dir)) | 27 | dma_map_single((dev), page_address(page)+(offset), (size), (dir)) |
36 | 28 | ||