aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/include/asm/dma-mapping.h
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2011-07-08 09:02:21 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2011-07-08 09:02:21 -0400
commit3973c337759cd201773a0ecc7b6f39f1ea2a6287 (patch)
tree5b2be9f17a2224f4d3c4d61c10657d4fd3e8d7f1 /arch/arm/include/asm/dma-mapping.h
parent5c8598fca1a359520623ed5409d23bb9e23d7da3 (diff)
ARM: dmabounce: simplify dma_set_mask()
Simplify the dmabounce specific code in dma_set_mask(). We can just omit setting the dma mask if dmabounce is enabled (we will have already set dma mask via callbacks when the device is created in that case.) Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/include/asm/dma-mapping.h')
-rw-r--r--arch/arm/include/asm/dma-mapping.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h
index 4ad25337f927..94662f4c9ea7 100644
--- a/arch/arm/include/asm/dma-mapping.h
+++ b/arch/arm/include/asm/dma-mapping.h
@@ -133,18 +133,12 @@ static inline int dma_supported(struct device *dev, u64 mask)
133 133
134static inline int dma_set_mask(struct device *dev, u64 dma_mask) 134static inline int dma_set_mask(struct device *dev, u64 dma_mask)
135{ 135{
136#ifdef CONFIG_DMABOUNCE
137 if (dev->archdata.dmabounce) {
138 if (dma_mask >= ISA_DMA_THRESHOLD)
139 return 0;
140 else
141 return -EIO;
142 }
143#endif
144 if (!dev->dma_mask || !dma_supported(dev, dma_mask)) 136 if (!dev->dma_mask || !dma_supported(dev, dma_mask))
145 return -EIO; 137 return -EIO;
146 138
139#ifndef CONFIG_DMABOUNCE
147 *dev->dma_mask = dma_mask; 140 *dev->dma_mask = dma_mask;
141#endif
148 142
149 return 0; 143 return 0;
150} 144}