Documentation: correct parameter error for dma_mapping_error
authorLiu Hua <sdu.liu@huawei.com>
Thu, 18 Sep 2014 04:15:28 +0000 (12:15 +0800)
committerJiri Kosina <jkosina@suse.cz>
Fri, 26 Sep 2014 09:22:29 +0000 (11:22 +0200)
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: Liu Hua <sdu.liu@huawei.com>
Acked-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Documentation/DMA-API-HOWTO.txt

index dcbbe3602d78a9f0864500c3d106feffb06f00a1..0f7afb2bb442e07f9eb5304e7e8fbc34e80866c6 100644 (file)
@@ -531,7 +531,7 @@ To map a single region, you do:
        size_t size = buffer->len;
 
        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,
                 * delay and try again later or
@@ -588,7 +588,7 @@ Specifically:
        size_t size = buffer->len;
 
        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,
                 * delay and try again later or
@@ -689,7 +689,7 @@ to use the dma_sync_*() interfaces.
                dma_addr_t mapping;
 
                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,
                         * delay and try again later or