diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2009-05-26 20:43:01 -0400 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-29 08:26:42 -0400 |
commit | 15aedea439c4d7dbec17c99b5e1594c01b979833 (patch) | |
tree | 350a919d744ebabd08364b843c9b8c7618c1b39e /lib | |
parent | ed888aef427365d19f887c271a3a906d16422d24 (diff) |
dma-debug: use sg_dma_address accessor instead of using dma_address directly
Architectures might not have dma_address in struct scatterlist (PARISC
doesn't). Directly accessing to dma_address in struct scatterlist is
wrong; we need to use sg_dma_address() accesssor instead.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dma-debug.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index e47e1a08c337..1b5bb82f106a 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -840,7 +840,7 @@ void debug_dma_map_sg(struct device *dev, struct scatterlist *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 = s->length; |
843 | entry->dev_addr = s->dma_address; | 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; |
846 | entry->sg_mapped_ents = mapped_ents; | 846 | entry->sg_mapped_ents = mapped_ents; |
@@ -872,7 +872,7 @@ void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist, | |||
872 | .type = dma_debug_sg, | 872 | .type = dma_debug_sg, |
873 | .dev = dev, | 873 | .dev = dev, |
874 | .paddr = sg_phys(s), | 874 | .paddr = sg_phys(s), |
875 | .dev_addr = s->dma_address, | 875 | .dev_addr = sg_dma_address(s), |
876 | .size = s->length, | 876 | .size = s->length, |
877 | .direction = dir, | 877 | .direction = dir, |
878 | .sg_call_ents = 0, | 878 | .sg_call_ents = 0, |
@@ -996,8 +996,8 @@ 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, s->dma_address, s->dma_length, 0, | 999 | check_sync(dev, sg_dma_address(s), s->dma_length, 0, |
1000 | direction, true); | 1000 | direction, true); |
1001 | } | 1001 | } |
1002 | } | 1002 | } |
1003 | EXPORT_SYMBOL(debug_dma_sync_sg_for_cpu); | 1003 | EXPORT_SYMBOL(debug_dma_sync_sg_for_cpu); |
@@ -1012,8 +1012,8 @@ 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, s->dma_address, s->dma_length, 0, | 1015 | check_sync(dev, sg_dma_address(s), s->dma_length, 0, |
1016 | direction, false); | 1016 | direction, false); |
1017 | } | 1017 | } |
1018 | } | 1018 | } |
1019 | EXPORT_SYMBOL(debug_dma_sync_sg_for_device); | 1019 | EXPORT_SYMBOL(debug_dma_sync_sg_for_device); |