diff options
author | 2008-09-19 02:02:05 +0900 | |
---|---|---|
committer | 2008-09-19 10:20:41 +0200 | |
commit | 07a2c01a0c2a0cb4581a67d50d4f17cb4d2457c4 (patch) | |
tree | 2c01e2ee314cf62e5a96cf7c6bde49a377a446df /lib | |
parent | x86: gart alloc_coherent does virtual mapppings only when necessary (diff) | |
download | linux-07a2c01a0c2a0cb4581a67d50d4f17cb4d2457c4.tar.gz linux-07a2c01a0c2a0cb4581a67d50d4f17cb4d2457c4.tar.bz2 linux-07a2c01a0c2a0cb4581a67d50d4f17cb4d2457c4.zip |
convert swiotlb to use dma_get_mask
swiotlb can use dma_get_mask() instead of the homegrown function.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: tony.luck@intel.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/swiotlb.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 240a67c2c979..f8eebd489149 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -276,11 +276,7 @@ cleanup1: static int address_needs_mapping(struct device *hwdev, dma_addr_t addr, size_t size) { - dma_addr_t mask = 0xffffffff; - /* If the device has a mask, use it, otherwise default to 32 bits */ - if (hwdev && hwdev->dma_mask) - mask = *hwdev->dma_mask; - return !is_buffer_dma_capable(mask, addr, size); + return !is_buffer_dma_capable(dma_get_mask(hwdev), addr, size); } static int is_swiotlb_buffer(char *addr) |