From: saeed bishara Date: Wed, 8 Aug 2007 11:09:00 +0000 (+0200) Subject: use sg helper function in DMA mapping documentation X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4c2f6d4c282c4d5210221697b9895ad90bc697cb;p=openwrt%2Fstaging%2Fblogic.git use sg helper function in DMA mapping documentation Signed-off-by: Saeed Bishara Signed-off-by: Jens Axboe --- 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); }