Skip to content

Commit

Permalink
fix an example of scatterlists handling in DMA-API.txt
Browse files Browse the repository at this point in the history
This example isn't the proper way to handle scatterlists (can't handle
sg chaining).

Signed-off-by: FUJITA Tomonori <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
fujita authored and Jens Axboe committed Oct 9, 2008
1 parent 4ee5eaf commit 79eb014
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Documentation/DMA-API.txt
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ With scatterlists, you use the resulting mapping like this:
int i, count = dma_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);
}
Expand Down

0 comments on commit 79eb014

Please sign in to comment.