]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - Documentation/DMA-mapping.txt
Merge branch 'sglist-arch' into for-linus
[linux-2.6-omap-h63xx.git] / Documentation / DMA-mapping.txt
index 8efe12d74268d47a65b8cb3f595bdc87c0400005..3c8ae020b6a7e3aeb183a5690ea3f0938c66c4f0 100644 (file)
@@ -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);
        }