|
@@ -9,6 +9,8 @@ static inline struct dma_map_ops *get_dma_ops(struct device *dev)
|
|
|
return dma_ops;
|
|
|
}
|
|
|
|
|
|
+#define DMA_ERROR_CODE 0
|
|
|
+
|
|
|
#include <asm-generic/dma-mapping-common.h>
|
|
|
|
|
|
static inline int dma_supported(struct device *dev, u64 mask)
|
|
@@ -38,17 +40,6 @@ static inline int dma_set_mask(struct device *dev, u64 mask)
|
|
|
void dma_cache_sync(struct device *dev, void *vaddr, size_t size,
|
|
|
enum dma_data_direction dir);
|
|
|
|
|
|
-static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
|
|
|
-{
|
|
|
- struct dma_map_ops *ops = get_dma_ops(dev);
|
|
|
-
|
|
|
- debug_dma_mapping_error(dev, dma_addr);
|
|
|
- if (ops->mapping_error)
|
|
|
- return ops->mapping_error(dev, dma_addr);
|
|
|
-
|
|
|
- return dma_addr == 0;
|
|
|
-}
|
|
|
-
|
|
|
/* arch/sh/mm/consistent.c */
|
|
|
extern void *dma_generic_alloc_coherent(struct device *dev, size_t size,
|
|
|
dma_addr_t *dma_addr, gfp_t flag,
|