Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 112591
b: refs/heads/master
c: 07a2c01
h: refs/heads/master
i:
  112589: a76a8bc
  112587: c01102b
  112583: db78650
  112575: 390ad35
v: v3
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Sep 19, 2008
1 parent 34fe07a commit dc1742f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f6a32a36ab96016675cd414802904feb288d7899
refs/heads/master: 07a2c01a0c2a0cb4581a67d50d4f17cb4d2457c4
2 changes: 1 addition & 1 deletion trunk/include/linux/dma-mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static inline int is_buffer_dma_capable(u64 mask, dma_addr_t addr, size_t size)

static inline u64 dma_get_mask(struct device *dev)
{
if (dev->dma_mask && *dev->dma_mask)
if (dev && dev->dma_mask && *dev->dma_mask)
return *dev->dma_mask;
return DMA_32BIT_MASK;
}
Expand Down
6 changes: 1 addition & 5 deletions trunk/lib/swiotlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,7 @@ swiotlb_late_init_with_default_size(size_t default_size)
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)
Expand Down

0 comments on commit dc1742f

Please sign in to comment.