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

Commit 30081d8e authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds
Browse files

sparc: use generic dma_set_mask



Sparc already uses the same code as the generic code for the PCI
implementation but just fails the call sbus.  This moves to the generic
implemenation which eventually return -EIO due to the NULL dma_mask
pointer in the device.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Joerg Roedel <jroedel@suse.de>
Cc: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 5348c1e9
Loading
Loading
Loading
Loading
+0 −15
Original line number Diff line number Diff line
@@ -37,21 +37,6 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
	return dma_ops;
}

#define HAVE_ARCH_DMA_SET_MASK 1

static inline int dma_set_mask(struct device *dev, u64 mask)
{
#ifdef CONFIG_PCI
	if (dev->bus == &pci_bus_type) {
		if (!dev->dma_mask || !dma_supported(dev, mask))
			return -EINVAL;
		*dev->dma_mask = mask;
		return 0;
	}
#endif
	return -EINVAL;
}

#include <asm-generic/dma-mapping-common.h>

#endif