aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-i386
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-i386')
-rw-r--r--include/asm-i386/dma-mapping.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/include/asm-i386/dma-mapping.h b/include/asm-i386/dma-mapping.h
index 576ae01d71c8..81999a3ebe7c 100644
--- a/include/asm-i386/dma-mapping.h
+++ b/include/asm-i386/dma-mapping.h
@@ -21,7 +21,7 @@ static inline dma_addr_t
21dma_map_single(struct device *dev, void *ptr, size_t size, 21dma_map_single(struct device *dev, void *ptr, size_t size,
22 enum dma_data_direction direction) 22 enum dma_data_direction direction)
23{ 23{
24 BUG_ON(direction == DMA_NONE); 24 BUG_ON(!valid_dma_direction(direction));
25 WARN_ON(size == 0); 25 WARN_ON(size == 0);
26 flush_write_buffers(); 26 flush_write_buffers();
27 return virt_to_phys(ptr); 27 return virt_to_phys(ptr);
@@ -31,7 +31,7 @@ static inline void
31dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size, 31dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
32 enum dma_data_direction direction) 32 enum dma_data_direction direction)
33{ 33{
34 BUG_ON(direction == DMA_NONE); 34 BUG_ON(!valid_dma_direction(direction));
35} 35}
36 36
37static inline int 37static inline int
@@ -40,7 +40,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
40{ 40{
41 int i; 41 int i;
42 42
43 BUG_ON(direction == DMA_NONE); 43 BUG_ON(!valid_dma_direction(direction));
44 WARN_ON(nents == 0 || sg[0].length == 0); 44 WARN_ON(nents == 0 || sg[0].length == 0);
45 45
46 for (i = 0; i < nents; i++ ) { 46 for (i = 0; i < nents; i++ ) {
@@ -57,7 +57,7 @@ static inline dma_addr_t
57dma_map_page(struct device *dev, struct page *page, unsigned long offset, 57dma_map_page(struct device *dev, struct page *page, unsigned long offset,
58 size_t size, enum dma_data_direction direction) 58 size_t size, enum dma_data_direction direction)
59{ 59{
60 BUG_ON(direction == DMA_NONE); 60 BUG_ON(!valid_dma_direction(direction));
61 return page_to_phys(page) + offset; 61 return page_to_phys(page) + offset;
62} 62}
63 63
@@ -65,7 +65,7 @@ static inline void
65dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size, 65dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
66 enum dma_data_direction direction) 66 enum dma_data_direction direction)
67{ 67{
68 BUG_ON(direction == DMA_NONE); 68 BUG_ON(!valid_dma_direction(direction));
69} 69}
70 70
71 71
@@ -73,7 +73,7 @@ static inline void
73dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries, 73dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
74 enum dma_data_direction direction) 74 enum dma_data_direction direction)
75{ 75{
76 BUG_ON(direction == DMA_NONE); 76 BUG_ON(!valid_dma_direction(direction));
77} 77}
78 78
79static inline void 79static inline void