diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dma-debug.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index 1b5bb82f106a..51f95e5b6265 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -839,7 +839,7 @@ void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | |||
839 | entry->type = dma_debug_sg; | 839 | entry->type = dma_debug_sg; |
840 | entry->dev = dev; | 840 | entry->dev = dev; |
841 | entry->paddr = sg_phys(s); | 841 | entry->paddr = sg_phys(s); |
842 | entry->size = s->length; | 842 | entry->size = sg_dma_len(s); |
843 | entry->dev_addr = sg_dma_address(s); | 843 | entry->dev_addr = sg_dma_address(s); |
844 | entry->direction = direction; | 844 | entry->direction = direction; |
845 | entry->sg_call_ents = nents; | 845 | entry->sg_call_ents = nents; |
@@ -847,7 +847,7 @@ void debug_dma_map_sg(struct device *dev, struct scatterlist *sg, | |||
847 | 847 | ||
848 | if (!PageHighMem(sg_page(s))) { | 848 | if (!PageHighMem(sg_page(s))) { |
849 | check_for_stack(dev, sg_virt(s)); | 849 | check_for_stack(dev, sg_virt(s)); |
850 | check_for_illegal_area(dev, sg_virt(s), s->length); | 850 | check_for_illegal_area(dev, sg_virt(s), sg_dma_len(s)); |
851 | } | 851 | } |
852 | 852 | ||
853 | add_dma_entry(entry); | 853 | add_dma_entry(entry); |
@@ -873,7 +873,7 @@ void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, | |||
873 | .dev = dev, | 873 | .dev = dev, |
874 | .paddr = sg_phys(s), | 874 | .paddr = sg_phys(s), |
875 | .dev_addr = sg_dma_address(s), | 875 | .dev_addr = sg_dma_address(s), |
876 | .size = s->length, | 876 | .size = sg_dma_len(s), |
877 | .direction = dir, | 877 | .direction = dir, |
878 | .sg_call_ents = 0, | 878 | .sg_call_ents = 0, |
879 | }; | 879 | }; |
@@ -996,7 +996,7 @@ void debug_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, | |||
996 | return; | 996 | return; |
997 | 997 | ||
998 | for_each_sg(sg, s, nelems, i) { | 998 | for_each_sg(sg, s, nelems, i) { |
999 | check_sync(dev, sg_dma_address(s), s->dma_length, 0, | 999 | check_sync(dev, sg_dma_address(s), sg_dma_len(s), 0, |
1000 | direction, true); | 1000 | direction, true); |
1001 | } | 1001 | } |
1002 | } | 1002 | } |
@@ -1012,7 +1012,7 @@ void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, | |||
1012 | return; | 1012 | return; |
1013 | 1013 | ||
1014 | for_each_sg(sg, s, nelems, i) { | 1014 | for_each_sg(sg, s, nelems, i) { |
1015 | check_sync(dev, sg_dma_address(s), s->dma_length, 0, | 1015 | check_sync(dev, sg_dma_address(s), sg_dma_len(s), 0, |
1016 | direction, false); | 1016 | direction, false); |
1017 | } | 1017 | } |
1018 | } | 1018 | } |