Commit 07256950 authored by Christoph Hellwig's avatar Christoph Hellwig

ia64/sba_iommu: remove the mapping_error dma_map_ops method

Return DMA_MAPPING_ERROR instead of 0 on a dma mapping failure and let
the core dma-mapping code handle the rest.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Acked-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 52aee3e8
...@@ -974,7 +974,7 @@ static dma_addr_t sba_map_page(struct device *dev, struct page *page, ...@@ -974,7 +974,7 @@ static dma_addr_t sba_map_page(struct device *dev, struct page *page,
pide = sba_alloc_range(ioc, dev, size); pide = sba_alloc_range(ioc, dev, size);
if (pide < 0) if (pide < 0)
return 0; return DMA_MAPPING_ERROR;
iovp = (dma_addr_t) pide << iovp_shift; iovp = (dma_addr_t) pide << iovp_shift;
...@@ -2155,11 +2155,6 @@ static int sba_dma_supported (struct device *dev, u64 mask) ...@@ -2155,11 +2155,6 @@ static int sba_dma_supported (struct device *dev, u64 mask)
return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL); return ((mask & 0xFFFFFFFFUL) == 0xFFFFFFFFUL);
} }
static int sba_dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
{
return 0;
}
__setup("nosbagart", nosbagart); __setup("nosbagart", nosbagart);
static int __init static int __init
...@@ -2193,7 +2188,6 @@ const struct dma_map_ops sba_dma_ops = { ...@@ -2193,7 +2188,6 @@ const struct dma_map_ops sba_dma_ops = {
.map_sg = sba_map_sg_attrs, .map_sg = sba_map_sg_attrs,
.unmap_sg = sba_unmap_sg_attrs, .unmap_sg = sba_unmap_sg_attrs,
.dma_supported = sba_dma_supported, .dma_supported = sba_dma_supported,
.mapping_error = sba_dma_mapping_error,
}; };
void sba_dma_init(void) void sba_dma_init(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment