diff options
author | Christoph Hellwig <hch@lst.de> | 2015-09-09 18:39:46 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-10 16:29:01 -0400 |
commit | efa21e432c7b3c8ae976039d614a017799b6e874 (patch) | |
tree | feab602cd4ff56407fd64a468ee6939b88d2141b /arch/xtensa/include | |
parent | 1e8937526e2309d48fccd81bb30a590ac21a5516 (diff) |
dma-mapping: cosolidate dma_mapping_error
Currently there are three valid implementations of dma_mapping_error:
(1) call ->mapping_error
(2) check for a hardcoded error code
(3) always return 0
This patch provides a common implementation that calls ->mapping_error
if present, then checks for DMA_ERROR_CODE if defined or otherwise
returns 0.
[jcmvbkbc@gmail.com: fix xtensa]
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Michal Simek <monstr@monstr.eu>
Cc: Jonas Bonn <jonas@southpole.se>
Cc: Chris Metcalf <cmetcalf@ezchip.com>
Cc: Guan Xuetao <gxt@mprc.pku.edu.cn>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/xtensa/include')
-rw-r--r-- | arch/xtensa/include/asm/dma-mapping.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/arch/xtensa/include/asm/dma-mapping.h b/arch/xtensa/include/asm/dma-mapping.h index 0a19581375da..21925bfdaff7 100644 --- a/arch/xtensa/include/asm/dma-mapping.h +++ b/arch/xtensa/include/asm/dma-mapping.h | |||
@@ -33,15 +33,6 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev) | |||
33 | #include <asm-generic/dma-mapping-common.h> | 33 | #include <asm-generic/dma-mapping-common.h> |
34 | 34 | ||
35 | static inline int | 35 | static inline int |
36 | dma_mapping_error(struct device *dev, dma_addr_t dma_addr) | ||
37 | { | ||
38 | struct dma_map_ops *ops = get_dma_ops(dev); | ||
39 | |||
40 | debug_dma_mapping_error(dev, dma_addr); | ||
41 | return ops->mapping_error(dev, dma_addr); | ||
42 | } | ||
43 | |||
44 | static inline int | ||
45 | dma_supported(struct device *dev, u64 mask) | 36 | dma_supported(struct device *dev, u64 mask) |
46 | { | 37 | { |
47 | return 1; | 38 | return 1; |