From 4c2f6d4c282c4d5210221697b9895ad90bc697cb Mon Sep 17 00:00:00 2001 From: saeed bishara Date: Wed, 8 Aug 2007 13:09:00 +0200 Subject: use sg helper function in DMA mapping documentation Signed-off-by: Saeed Bishara Signed-off-by: Jens Axboe --- Documentation/DMA-mapping.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation') diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index e07f2530326b..6883921743f0 100644 --- a/Documentation/DMA-mapping.txt +++ b/Documentation/DMA-mapping.txt @@ -514,7 +514,7 @@ With scatterlists, you map a region gathered from several regions by: int i, count = pci_map_sg(dev, sglist, nents, direction); struct scatterlist *sg; - for (i = 0, sg = sglist; i < count; i++, sg++) { + for_each_sg(sglist, sg, count, i) { hw_address[i] = sg_dma_address(sg); hw_len[i] = sg_dma_len(sg); } -- cgit v1.2.3