Commit b2dd83b3 authored by Liu Hua's avatar Liu Hua Committed by Jiri Kosina

Documentation: correct parameter error for dma_mapping_error

dma_mapping_error takes two parameters, but some of examples
in Documentation/DMA-API-HOWTO.txt just takes one. So correct
it.
Signed-off-by: default avatarLiu Hua <sdu.liu@huawei.com>
Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 53007a7b
...@@ -531,7 +531,7 @@ To map a single region, you do: ...@@ -531,7 +531,7 @@ To map a single region, you do:
size_t size = buffer->len; size_t size = buffer->len;
dma_handle = dma_map_single(dev, addr, size, direction); dma_handle = dma_map_single(dev, addr, size, direction);
if (dma_mapping_error(dma_handle)) { if (dma_mapping_error(dev, dma_handle)) {
/* /*
* reduce current DMA mapping usage, * reduce current DMA mapping usage,
* delay and try again later or * delay and try again later or
...@@ -588,7 +588,7 @@ Specifically: ...@@ -588,7 +588,7 @@ Specifically:
size_t size = buffer->len; size_t size = buffer->len;
dma_handle = dma_map_page(dev, page, offset, size, direction); dma_handle = dma_map_page(dev, page, offset, size, direction);
if (dma_mapping_error(dma_handle)) { if (dma_mapping_error(dev, dma_handle)) {
/* /*
* reduce current DMA mapping usage, * reduce current DMA mapping usage,
* delay and try again later or * delay and try again later or
...@@ -689,7 +689,7 @@ to use the dma_sync_*() interfaces. ...@@ -689,7 +689,7 @@ to use the dma_sync_*() interfaces.
dma_addr_t mapping; dma_addr_t mapping;
mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE); mapping = dma_map_single(cp->dev, buffer, len, DMA_FROM_DEVICE);
if (dma_mapping_error(dma_handle)) { if (dma_mapping_error(cp->dev, dma_handle)) {
/* /*
* reduce current DMA mapping usage, * reduce current DMA mapping usage,
* delay and try again later or * delay and try again later or
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment