Skip to content

Commit

Permalink
ARM: dmabounce: simplify dma_set_mask()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Russell King committed Jul 8, 2011
1 parent 5c8598f commit 3973c33
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions arch/arm/include/asm/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3973c33

Please sign in to comment.