From: Christoph Hellwig Date: Wed, 20 Jan 2016 23:01:59 +0000 (-0800) Subject: sparc: use generic dma_set_mask X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=30081d8ea47d521e8804398b25f59b8e49a2ed0b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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: Christoph Hellwig Cc: "David S. Miller" Cc: Christian Borntraeger Cc: Joerg Roedel Cc: Sebastian Ott Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/sparc/include/asm/dma-mapping.h b/arch/sparc/include/asm/dma-mapping.h index a21da597b0b5..2777092dd851 100644 --- a/arch/sparc/include/asm/dma-mapping.h +++ b/arch/sparc/include/asm/dma-mapping.h @@ -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 #endif