[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1243384983-3863-2-git-send-email-fujita.tomonori@lab.ntt.co.jp>
Date: Wed, 27 May 2009 09:43:01 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: mingo@...e.hu
Cc: joerg.roedel@....com, fujita.tomonori@....ntt.co.jp,
linux-kernel@...r.kernel.org
Subject: [PATCH -tip 1/3] 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@....ntt.co.jp>
---
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 cdd205d..64aaa96 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -784,7 +784,7 @@ void debug_dma_map_sg(struct device *dev, struct scatterlist *sg,
entry->dev = dev;
entry->paddr = sg_phys(s);
entry->size = s->length;
- entry->dev_addr = s->dma_address;
+ entry->dev_addr = sg_dma_address(s);
entry->direction = direction;
entry->sg_call_ents = nents;
entry->sg_mapped_ents = mapped_ents;
@@ -816,7 +816,7 @@ void debug_dma_unmap_sg(struct device *dev, struct scatterlist *sglist,
.type = dma_debug_sg,
.dev = dev,
.paddr = sg_phys(s),
- .dev_addr = s->dma_address,
+ .dev_addr = sg_dma_address(s),
.size = s->length,
.direction = dir,
.sg_call_ents = 0,
@@ -940,8 +940,8 @@ void debug_dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg,
return;
for_each_sg(sg, s, nelems, i) {
- check_sync(dev, s->dma_address, s->dma_length, 0,
- direction, true);
+ check_sync(dev, sg_dma_address(s), s->dma_length, 0,
+ direction, true);
}
}
EXPORT_SYMBOL(debug_dma_sync_sg_for_cpu);
@@ -956,8 +956,8 @@ void debug_dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg,
return;
for_each_sg(sg, s, nelems, i) {
- check_sync(dev, s->dma_address, s->dma_length, 0,
- direction, false);
+ check_sync(dev, sg_dma_address(s), s->dma_length, 0,
+ direction, false);
}
}
EXPORT_SYMBOL(debug_dma_sync_sg_for_device);
--
1.6.0.6
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists