Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3973c337 authored by Russell King's avatar Russell King
Browse files

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: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 5c8598fc
Loading
Loading
Loading
Loading
+2 −8
Original line number Diff line number Diff line
@@ -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;
}