diff options
| author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-09-08 05:53:48 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-08 09:53:30 -0400 |
| commit | 9dfda12b8b769e224ca4efbc35ace4524b9c017b (patch) | |
| tree | f8a0e5fa2377038df3017d8e4af9f3cdb5267177 /lib | |
| parent | 68e91d61346db4359464d06617500141cfd1442a (diff) | |
swiotlb: use map_single instead of swiotlb_map_single in swiotlb_alloc_coherent
We always need swiotlb memory here so address_needs_mapping and
swiotlb_force testings are irrelevant. map_single should be used here
instead of swiotlb_map_single.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/swiotlb.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 3066ffe1f9eb..2fb485d0e7eb 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
| @@ -483,12 +483,9 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size, | |||
| 483 | * swiotlb_map_single(), which will grab memory from | 483 | * swiotlb_map_single(), which will grab memory from |
| 484 | * the lowest available address range. | 484 | * the lowest available address range. |
| 485 | */ | 485 | */ |
| 486 | dma_addr_t handle; | 486 | ret = map_single(hwdev, NULL, size, DMA_FROM_DEVICE); |
| 487 | handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE); | 487 | if (!ret) |
| 488 | if (swiotlb_dma_mapping_error(hwdev, handle)) | ||
| 489 | return NULL; | 488 | return NULL; |
| 490 | |||
| 491 | ret = bus_to_virt(handle); | ||
| 492 | } | 489 | } |
| 493 | 490 | ||
| 494 | memset(ret, 0, size); | 491 | memset(ret, 0, size); |
