x86: remove map_single and unmap_single in struct dma_mapping_ops

This patch converts dma_map_single and dma_unmap_single to use
map_page and unmap_page respectively and removes unnecessary
map_single and unmap_single in struct dma_mapping_ops.

This leaves intel-iommu's dma_map_single and dma_unmap_single since
IA64 uses them. They will be removed after the unification.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
FUJITA Tomonori
2009-01-05 23:47:28 +09:00
committed by Ingo Molnar
parent 33feffd452
commit d7dff84053
7 changed files with 8 additions and 76 deletions

View File

@@ -38,13 +38,6 @@ static dma_addr_t nommu_map_page(struct device *dev, struct page *page,
return bus;
}
static dma_addr_t nommu_map_single(struct device *hwdev, phys_addr_t paddr,
size_t size, int direction)
{
return nommu_map_page(hwdev, pfn_to_page(paddr >> PAGE_SHIFT),
paddr & ~PAGE_MASK, size, direction, NULL);
}
/* Map a set of buffers described by scatterlist in streaming
* mode for DMA. This is the scatter-gather version of the
* above pci_map_single interface. Here the scatter gather list
@@ -88,7 +81,6 @@ static void nommu_free_coherent(struct device *dev, size_t size, void *vaddr,
struct dma_mapping_ops nommu_dma_ops = {
.alloc_coherent = dma_generic_alloc_coherent,
.free_coherent = nommu_free_coherent,
.map_single = nommu_map_single,
.map_sg = nommu_map_sg,
.map_page = nommu_map_page,
.is_phys = 1,