From 2bc75476d013a9723e77fbe32e3435256ef7fae3 Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Mon, 8 Sep 2008 18:53:48 +0900 Subject: [PATCH] --- yaml --- r: 112574 b: refs/heads/master c: 9dfda12b8b769e224ca4efbc35ace4524b9c017b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/lib/swiotlb.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 6ce31c27d231..51bec8d39020 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 68e91d61346db4359464d06617500141cfd1442a +refs/heads/master: 9dfda12b8b769e224ca4efbc35ace4524b9c017b diff --git a/trunk/lib/swiotlb.c b/trunk/lib/swiotlb.c index 3066ffe1f9eb..2fb485d0e7eb 100644 --- a/trunk/lib/swiotlb.c +++ b/trunk/lib/swiotlb.c @@ -483,12 +483,9 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size, * swiotlb_map_single(), which will grab memory from * the lowest available address range. */ - dma_addr_t handle; - handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE); - if (swiotlb_dma_mapping_error(hwdev, handle)) + ret = map_single(hwdev, NULL, size, DMA_FROM_DEVICE); + if (!ret) return NULL; - - ret = bus_to_virt(handle); } memset(ret, 0, size);