Skip to content

Commit

Permalink
Documentation/DMA-API-HOWTO.txt: fix misleading example
Browse files Browse the repository at this point in the history
See: DMA-API.txt, part Id, DMA_FROM_DEVICE description.

Signed-off-by: Michal Miroslaw <[email protected]>
Cc: FUJITA Tomonori <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
osctobe authored and torvalds committed Jul 26, 2011
1 parent 91f6cdf commit 3f0fb4e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Documentation/DMA-API-HOWTO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -613,13 +613,13 @@ to use the dma_sync_*() interfaces.
pass_to_upper_layers(cp->rx_buf);
make_and_setup_new_rx_buf(cp);
} else {
/* Just sync the buffer and give it back
* to the card.
/* CPU should not write to
* DMA_FROM_DEVICE-mapped area,
* so dma_sync_single_for_device() is
* not needed here. It would be required
* for DMA_BIDIRECTIONAL mapping if
* the memory was modified.
*/
dma_sync_single_for_device(&cp->dev,
cp->rx_dma,
cp->rx_len,
DMA_FROM_DEVICE);
give_rx_buf_to_card(cp);
}
}
Expand Down

0 comments on commit 3f0fb4e

Please sign in to comment.