History

dma-buf: Update [un]map documentation to match the other functions

Other function have inline documentation, a couple still have theirs at the top of the structure, update the docs and move them inline.

Andrew F. Davis committed 7 years ago

Commit d5ae7711 parent 67b886d1 file · +25 −4Browse files

Showing the changes to include/linux (1 of 1 file). Show all

Unified · Split

include/linux/dma-buf.h+25−4
@@ -39,8 +39,6 @@ struct dma_buf_attachment; · 38 unmodified lines
39 39
40/**40/**
41 * struct dma_buf_ops - operations possible on struct dma_buf41 * struct dma_buf_ops - operations possible on struct dma_buf
42 * @map: [optional] maps a page from the buffer into kernel address space.
43 * @unmap: [optional] unmaps a page from the buffer.
44 * @vmap: [optional] creates a virtual mapping for the buffer into kernel42 * @vmap: [optional] creates a virtual mapping for the buffer into kernel
45 * address space. Same restrictions as for vmap and friends apply.43 * address space. Same restrictions as for vmap and friends apply.
46 * @vunmap: [optional] unmaps a vmap from the buffer44 * @vunmap: [optional] unmaps a vmap from the buffer
@@ -200,8 +198,6 @@ struct dma_buf_ops { · 153 unmodified lines
200 * to be restarted.198 * to be restarted.
201 */199 */
202 int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction);200 int (*end_cpu_access)(struct dma_buf *, enum dma_data_direction);
203 void *(*map)(struct dma_buf *, unsigned long);
204 void (*unmap)(struct dma_buf *, unsigned long, void *);
205 201
206 /**202 /**
207 * @mmap:203 * @mmap:
@@ -240,6 +236,31 @@ struct dma_buf_ops { · 32 unmodified lines
240 */236 */
241 int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);237 int (*mmap)(struct dma_buf *, struct vm_area_struct *vma);
242 238
239 /**
240 * @map:
241 *
242 * Maps a page from the buffer into kernel address space. The page is
243 * specified by offset into the buffer in PAGE_SIZE units.
244 *
245 * This callback is optional.
246 *
247 * Returns:
248 *
249 * Virtual address pointer where requested page can be accessed. NULL
250 * on error or when this function is unimplemented by the exporter.
251 */
252 void *(*map)(struct dma_buf *, unsigned long);
253
254 /**
255 * @unmap:
256 *
257 * Unmaps a page from the buffer. Page offset and address pointer should
258 * be the same as the one passed to and returned by matching call to map.
259 *
260 * This callback is optional.
261 */
262 void (*unmap)(struct dma_buf *, unsigned long, void *);
263
243 void *(*vmap)(struct dma_buf *);264 void *(*vmap)(struct dma_buf *);
244 void (*vunmap)(struct dma_buf *, void *vaddr);265 void (*vunmap)(struct dma_buf *, void *vaddr);
245};266};

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t