提交 050d228a 编写于 作者: C Christoph Hellwig

dma-noop: remove dma_supported and mapping_error methods

These just duplicate the default behavior if no method is provided.
Signed-off-by: NChristoph Hellwig <hch@lst.de>
上级 b02c2b0b
...@@ -54,23 +54,11 @@ static int dma_noop_map_sg(struct device *dev, struct scatterlist *sgl, int nent ...@@ -54,23 +54,11 @@ static int dma_noop_map_sg(struct device *dev, struct scatterlist *sgl, int nent
return nents; return nents;
} }
static int dma_noop_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
return 0;
}
static int dma_noop_supported(struct device *dev, u64 mask)
{
return 1;
}
const struct dma_map_ops dma_noop_ops = { const struct dma_map_ops dma_noop_ops = {
.alloc = dma_noop_alloc, .alloc = dma_noop_alloc,
.free = dma_noop_free, .free = dma_noop_free,
.map_page = dma_noop_map_page, .map_page = dma_noop_map_page,
.map_sg = dma_noop_map_sg, .map_sg = dma_noop_map_sg,
.mapping_error = dma_noop_mapping_error,
.dma_supported = dma_noop_supported,
}; };
EXPORT_SYMBOL(dma_noop_ops); EXPORT_SYMBOL(dma_noop_ops);
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册