diff options
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: | |||
276 | static int | 276 | static int |
277 | address_needs_mapping(struct device *hwdev, dma_addr_t addr, size_t size) | 277 | address_needs_mapping(struct device *hwdev, dma_addr_t addr, size_t size) |
278 | { | 278 | { |
279 | dma_addr_t mask = 0xffffffff; | 279 | return !is_buffer_dma_capable(dma_get_mask(hwdev), addr, size); |
280 | /* If the device has a mask, use it, otherwise default to 32 bits */ | ||
281 | if (hwdev && hwdev->dma_mask) | ||
282 | mask = *hwdev->dma_mask; | ||
283 | return !is_buffer_dma_capable(mask, addr, size); | ||
284 | } | 280 | } |
285 | 281 | ||
286 | static int is_swiotlb_buffer(char *addr) | 282 | static int is_swiotlb_buffer(char *addr) |