Commit c138782d authored by Liviu Dudau's avatar Liviu Dudau Committed by Gustavo Padovan

dma-buf: Cleanup comments on dma_buf_map_attachment()

Mappings need to be unmapped by calling dma_buf_unmap_attachment() and
not by calling again dma_buf_map_attachment(). Also fix some spelling
mistakes.
Signed-off-by: default avatarLiviu Dudau <liviu.dudau@arm.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171101140630.2884-1-Liviu.Dudau@arm.com
parent 21be9154
...@@ -351,13 +351,13 @@ static inline int is_dma_buf_file(struct file *file) ...@@ -351,13 +351,13 @@ static inline int is_dma_buf_file(struct file *file)
* *
* 2. Userspace passes this file-descriptors to all drivers it wants this buffer * 2. Userspace passes this file-descriptors to all drivers it wants this buffer
* to share with: First the filedescriptor is converted to a &dma_buf using * to share with: First the filedescriptor is converted to a &dma_buf using
* dma_buf_get(). The the buffer is attached to the device using * dma_buf_get(). Then the buffer is attached to the device using
* dma_buf_attach(). * dma_buf_attach().
* *
* Up to this stage the exporter is still free to migrate or reallocate the * Up to this stage the exporter is still free to migrate or reallocate the
* backing storage. * backing storage.
* *
* 3. Once the buffer is attached to all devices userspace can inniate DMA * 3. Once the buffer is attached to all devices userspace can initiate DMA
* access to the shared buffer. In the kernel this is done by calling * access to the shared buffer. In the kernel this is done by calling
* dma_buf_map_attachment() and dma_buf_unmap_attachment(). * dma_buf_map_attachment() and dma_buf_unmap_attachment().
* *
...@@ -617,7 +617,7 @@ EXPORT_SYMBOL_GPL(dma_buf_detach); ...@@ -617,7 +617,7 @@ EXPORT_SYMBOL_GPL(dma_buf_detach);
* Returns sg_table containing the scatterlist to be returned; returns ERR_PTR * Returns sg_table containing the scatterlist to be returned; returns ERR_PTR
* on error. May return -EINTR if it is interrupted by a signal. * on error. May return -EINTR if it is interrupted by a signal.
* *
* A mapping must be unmapped again using dma_buf_map_attachment(). Note that * A mapping must be unmapped by using dma_buf_unmap_attachment(). Note that
* the underlying backing storage is pinned for as long as a mapping exists, * the underlying backing storage is pinned for as long as a mapping exists,
* therefore users/importers should not hold onto a mapping for undue amounts of * therefore users/importers should not hold onto a mapping for undue amounts of
* time. * time.
......
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