From: Russell King Date: Fri, 8 Jul 2011 13:02:21 +0000 (+0100) Subject: ARM: dmabounce: simplify dma_set_mask() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3973c337759cd201773a0ecc7b6f39f1ea2a6287;p=linux-beck.git 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 --- 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) static inline int dma_set_mask(struct device *dev, u64 dma_mask) { -#ifdef CONFIG_DMABOUNCE - if (dev->archdata.dmabounce) { - if (dma_mask >= ISA_DMA_THRESHOLD) - return 0; - else - return -EIO; - } -#endif if (!dev->dma_mask || !dma_supported(dev, dma_mask)) return -EIO; +#ifndef CONFIG_DMABOUNCE *dev->dma_mask = dma_mask; +#endif return 0; }