diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-07-22 22:18:49 -0400 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-07-28 01:19:18 -0400 |
commit | 02ca646e73f3cb9be69e339841b94edae675e248 (patch) | |
tree | 08277cb352e290ca5c0f52fd31c0bf4fc273e5f5 /arch/powerpc/kernel/dma-swiotlb.c | |
parent | cf56e3f2e8a8d5b7bc719980869b0e7985c256f3 (diff) |
swiotlb: remove unnecessary swiotlb_bus_to_virt
swiotlb_bus_to_virt is unncessary; we can use swiotlb_bus_to_phys and
phys_to_virt instead.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Becky Bruce <beckyb@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel/dma-swiotlb.c')
-rw-r--r-- | arch/powerpc/kernel/dma-swiotlb.c | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/powerpc/kernel/dma-swiotlb.c b/arch/powerpc/kernel/dma-swiotlb.c index 68ccf11e4f19..41534ae2f589 100644 --- a/arch/powerpc/kernel/dma-swiotlb.c +++ b/arch/powerpc/kernel/dma-swiotlb.c | |||
@@ -24,16 +24,6 @@ | |||
24 | int swiotlb __read_mostly; | 24 | int swiotlb __read_mostly; |
25 | unsigned int ppc_swiotlb_enable; | 25 | unsigned int ppc_swiotlb_enable; |
26 | 26 | ||
27 | void *swiotlb_bus_to_virt(struct device *hwdev, dma_addr_t addr) | ||
28 | { | ||
29 | unsigned long pfn = PFN_DOWN(swiotlb_bus_to_phys(hwdev, addr)); | ||
30 | void *pageaddr = page_address(pfn_to_page(pfn)); | ||
31 | |||
32 | if (pageaddr != NULL) | ||
33 | return pageaddr + (addr % PAGE_SIZE); | ||
34 | return NULL; | ||
35 | } | ||
36 | |||
37 | dma_addr_t swiotlb_phys_to_bus(struct device *hwdev, phys_addr_t paddr) | 27 | dma_addr_t swiotlb_phys_to_bus(struct device *hwdev, phys_addr_t paddr) |
38 | { | 28 | { |
39 | return paddr + get_dma_direct_offset(hwdev); | 29 | return paddr + get_dma_direct_offset(hwdev); |